-
Notifications
You must be signed in to change notification settings - Fork 181
Add additional missing BUSL license headers #871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional missing BUSL license headers #871
Conversation
|
Warning Rate limit exceeded@transphorm has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 22 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (37)
WalkthroughThis PR adds SPDX license headers across configs, scripts, Fastlane helpers, tests, and example files; updates ESLint ignorePatterns and overrides; re-enables the header rule for .cjs; converts some TS imports to type-only; performs minor import reorderings/formatting; and updates the test:build script to call bundle-analyze directly. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (10)
app/docs/examples/tree-shaking/level2-optimal-example.ts (1)
1-1: Optional: adopt multi-line SPDX/REUSE style for broader tooling compatibilitySome scanners prefer SPDX and copyright lines split. If your ESLint header rule allows, consider:
-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +// SPDX-License-Identifier: BUSL-1.1 +// Copyright (c) 2025 Social Connect Labs, Inc. +// Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/src/types/png.d.ts (1)
1-1: Optional typing improvement (not blocking this PR)Unrelated to licensing, but consider tightening the PNG module typing to improve RN type-safety:
// app/src/types/png.d.ts declare module '*.png' { import { ImageSourcePropType } from 'react-native'; const content: ImageSourcePropType; export default content; }app/docs/examples/tree-shaking/level3-optimal-example.ts (1)
1-1: SPDX header added — looks goodPlacement and comment style are correct. If your ESLint rule expects a standalone SPDX line, consider splitting as suggested in tests to avoid false positives.
app/fastlane/helpers/ios.rb (1)
1-1: Keep SPDX identifier on its own line for maximum tooling compatibilitySome scanners expect the SPDX tag to be on a standalone line. Suggest splitting the combined header into separate lines.
-# SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +# SPDX-License-Identifier: BUSL-1.1 +# Copyright (c) 2025 Social Connect Labs, Inc. +# Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/scripts/analyze-tree-shaking.cjs (1)
2-2: Place SPDX on its own line; keep shebang on line 1 (good)Shebang remains first (correct). For better SPDX tooling support, split the header into multiple lines.
-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +// SPDX-License-Identifier: BUSL-1.1 +// Copyright (c) 2025 Social Connect Labs, Inc. +// Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/fastlane/helpers/common.rb (1)
1-1: Split the license header for SPDX parsersKeeping the SPDX identifier alone on the first line improves parser reliability.
-# SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +# SPDX-License-Identifier: BUSL-1.1 +# Copyright (c) 2025 Social Connect Labs, Inc. +# Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/fastlane/helpers/android.rb (1)
1-1: Split combined header into separate linesImproves compatibility with SPDX scanners and code formatters.
-# SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +# SPDX-License-Identifier: BUSL-1.1 +# Copyright (c) 2025 Social Connect Labs, Inc. +# Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/metro.config.cjs (1)
1-1: Prefer standalone SPDX identifier lineConsider splitting the header for better SPDX tooling support.
-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +// SPDX-License-Identifier: BUSL-1.1 +// Copyright (c) 2025 Social Connect Labs, Inc. +// Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/fastlane/helpers/slack.rb (1)
1-1: Split header into multiple lines for SPDX compatibilityThis is a nit, but helps automated scanners and keeps consistency across languages.
-# SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +# SPDX-License-Identifier: BUSL-1.1 +# Copyright (c) 2025 Social Connect Labs, Inc. +# Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11app/scripts/test-e2e-local.sh (1)
2-2: Shell header: SPDX on its own line; shebang stays first (good)Split the combined header for better SPDX parsing while keeping shebang on line 1.
-# SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11 +# SPDX-License-Identifier: BUSL-1.1 +# Copyright (c) 2025 Social Connect Labs, Inc. +# Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
app/.eslintrc.cjs(2 hunks)app/babel.config.cjs(1 hunks)app/docs/examples/tree-shaking/granular-circuits-example.ts(1 hunks)app/docs/examples/tree-shaking/level2-optimal-example.ts(1 hunks)app/docs/examples/tree-shaking/level3-migration-guide.ts(1 hunks)app/docs/examples/tree-shaking/level3-optimal-example.ts(1 hunks)app/fastlane/helpers/android.rb(1 hunks)app/fastlane/helpers/common.rb(1 hunks)app/fastlane/helpers/ios.rb(1 hunks)app/fastlane/helpers/slack.rb(1 hunks)app/fastlane/test/app_name_test.rb(1 hunks)app/fastlane/test/helpers_test.rb(1 hunks)app/jest.config.cjs(1 hunks)app/metro.config.cjs(1 hunks)app/react-native.config.cjs(1 hunks)app/scripts/analyze-tree-shaking.cjs(1 hunks)app/scripts/bundle-analyze-ci.cjs(1 hunks)app/scripts/check-duplicate-headers.cjs(1 hunks)app/scripts/cleanup-ios-build.sh(1 hunks)app/scripts/generate-changelog.sh(1 hunks)app/scripts/release.sh(1 hunks)app/scripts/test-e2e-local.sh(1 hunks)app/scripts/test-tree-shaking.cjs(1 hunks)app/scripts/tests/alias-imports.test.cjs(1 hunks)app/scripts/tests/bundle-analyze-ci.test.cjs(1 hunks)app/scripts/tests/cleanup-ios-build.test.cjs(1 hunks)app/scripts/tests/mobile-deploy-confirm-module.test.cjs(1 hunks)app/scripts/tests/tree-shaking.test.cjs(1 hunks)app/src/types/png.d.ts(1 hunks)app/src/types/svg.d.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit Configuration File
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/types/png.d.tsapp/src/types/svg.d.ts
🔇 Additional comments (21)
app/docs/examples/tree-shaking/level2-optimal-example.ts (1)
1-1: SPDX header added correctlyHeader syntax and placement look good. No functional impact.
app/docs/examples/tree-shaking/granular-circuits-example.ts (1)
1-1: SPDX header added correctlyConsistent with other example files. No functional changes.
app/src/types/png.d.ts (1)
1-1: SPDX header added correctlyLooks good and consistent with TypeScript single-line comment style.
app/src/types/svg.d.ts (1)
1-1: SPDX header added correctlyHeader format and placement are correct for .d.ts files.
app/docs/examples/tree-shaking/level3-migration-guide.ts (1)
1-1: SPDX header added correctlyNo content changes beyond licensing; header placement is correct.
app/fastlane/test/app_name_test.rb (1)
1-1: SPDX header added correctlyRuby comment style is correct; no impact on tests.
app/scripts/tests/mobile-deploy-confirm-module.test.cjs (1)
1-1: SPDX header added correctlyHeader added without affecting CommonJS test semantics.
app/scripts/tests/alias-imports.test.cjs (2)
2-2: SPDX header after shebang — correct placementWith a shebang on Line 1, placing the header on Line 2 is the right call.
2-2: All SPDX headers are correctly appliedThe ripgrep check returned no missing files—every code file (excluding
app/android) includes the BUSL-1.1 SPDX header on its first non-shebang line. No further action required.app/scripts/release.sh (1)
2-2: Shebang preserved; header correctly placed on line 2This is the right placement for shell scripts. No functional impact.
app/jest.config.cjs (1)
1-1: SPDX header added — acknowledgedCJS single-line comment is appropriate. Ensure your ESLint header rule pattern matches this exact format across configs.
app/scripts/cleanup-ios-build.sh (1)
2-2: Header placement is correct for shellKept after the shebang; no runtime effect. Good.
app/scripts/generate-changelog.sh (1)
2-2: Header placement is correct for shellNo functional change; safe.
app/react-native.config.cjs (1)
1-1: SPDX header added — goodNo behavioral impact. Consistent with other configs.
app/babel.config.cjs (1)
1-1: SPDX header added — goodNo functional change; aligns with repo-wide standardization.
app/scripts/bundle-analyze-ci.cjs (1)
2-2: Header placement LGTMHeader comes right after the shebang, which avoids breaking executable scripts and aligns with ESLint’s header rule.
app/scripts/tests/tree-shaking.test.cjs (1)
2-2: Header added correctlyConsistent with the enforced single-line header format. No test behavior changes.
app/scripts/test-tree-shaking.cjs (1)
2-2: Header added correctlyPlaced after the shebang; won’t affect script execution.
app/scripts/tests/bundle-analyze-ci.test.cjs (1)
2-2: Header added correctlyMatches the configured ESLint header; no impact on test logic.
app/fastlane/test/helpers_test.rb (1)
1-1: Header added correctlyRuby comment style is correct; no semantic changes to tests.
app/.eslintrc.cjs (1)
1-1: ESLint header rule alignmentTop-of-file header matches the configured single-line header string. Good consistency across files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (5)
fix_all_missing_newlines.sh (1)
37-37: Fix mojibake in completion message.The final echo prints garbled characters. Use a valid emoji or plain text.
-echo "�� All files fixed!" +echo "✅ All files fixed!"fix_all_comprehensive.sh (2)
5-26: Reduce maintenance: populate arrays programmatically from detector output.Manually curating single/split lists is error-prone. Prefer generating these lists via find_missing_newlines_fixed.sh (which can emit the correct “after line” for each file), or unify into one auto-detecting fixer.
I can provide a single script that reads filenames and whether to insert after 1 or 2 based on shebang/license detection.
Also applies to: 27-50
51-51: Fix mojibake in completion message.-echo "�� All files fixed!" +echo "✅ All files fixed!"find_missing_newlines_fixed.sh (2)
1-4: Add safe shell options.Harden the script to fail fast and avoid word-splitting surprises.
#!/bin/bash -echo "🔍 Finding ALL files missing new lines after license headers (including split headers)..." +set -euo pipefail +IFS=$'\n\t' + +echo "🔍 Finding ALL files missing new lines after license headers (including split headers)..."
30-38: Clarify policy: enforce an actual blank line (not a comment) after the header.You currently treat a comment line as acceptable. If the goal is “blank line after license header,” tighten the check to require an empty line.
Proposed stricter checks:
- if [ -n "$third_line" ] && ! [[ "$third_line" =~ ^[[:space:]]*$ ]] && ! [[ "$third_line" =~ ^[[:space:]]*// ]] && ! [[ "$third_line" =~ ^[[:space:]]*# ]] && ! [[ "$third_line" =~ ^[[:space:]]*/\* ]]; then + if [ -n "$third_line" ] && ! [[ "$third_line" =~ ^[[:space:]]*$ ]]; then- if [ -n "$second_line" ] && ! [[ "$second_line" =~ ^[[:space:]]*$ ]] && ! [[ "$second_line" =~ ^[[:space:]]*// ]] && ! [[ "$second_line" =~ ^[[:space:]]*# ]] && ! [[ "$second_line" =~ ^[[:space:]]*/\* ]]; then + if [ -n "$second_line" ] && ! [[ "$second_line" =~ ^[[:space:]]*$ ]]; thenPlease confirm whether comments are allowed immediately after the header or if an empty line is mandatory. I can adjust the fixer accordingly.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/.eslintrc.cjs(2 hunks)app/jest.config.cjs(1 hunks)app/metro.config.cjs(1 hunks)app/src/types/png.d.ts(1 hunks)find_missing_newlines_fixed.sh(1 hunks)fix_all_comprehensive.sh(1 hunks)fix_all_missing_newlines.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- app/jest.config.cjs
- app/.eslintrc.cjs
- app/src/types/png.d.ts
- app/metro.config.cjs
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: e2e-ios
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
- GitHub Check: build
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/fastlane/helpers/ios.rb (1)
10-15: Remove trailing comma (RuboCop: Style/TrailingCommaInArguments)Keep argument lists compliant with project RuboCop rules.
- platform: "ios", + platform: "ios"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
app/babel.config.cjs(1 hunks)app/env.ts(1 hunks)app/fastlane/helpers/ios.rb(3 hunks)app/react-native.config.cjs(1 hunks)app/scripts/alias-imports.cjs(1 hunks)app/scripts/analyze-tree-shaking.cjs(1 hunks)app/scripts/bundle-analyze-ci.cjs(1 hunks)app/scripts/cleanup-ios-build.sh(1 hunks)app/scripts/test-e2e-local.sh(1 hunks)app/scripts/test-tree-shaking.cjs(1 hunks)app/scripts/tests/alias-imports.test.cjs(1 hunks)app/scripts/tests/bundle-analyze-ci.test.cjs(1 hunks)app/scripts/tests/cleanup-ios-build.test.cjs(1 hunks)app/scripts/tests/mobile-deploy-confirm-module.test.cjs(1 hunks)app/scripts/tests/tree-shaking.test.cjs(1 hunks)app/src/types/svg.d.ts(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- app/scripts/alias-imports.cjs
- app/env.ts
- app/scripts/cleanup-ios-build.sh
- app/scripts/tests/cleanup-ios-build.test.cjs
- app/react-native.config.cjs
🚧 Files skipped from review as they are similar to previous changes (10)
- app/scripts/tests/alias-imports.test.cjs
- app/babel.config.cjs
- app/scripts/tests/bundle-analyze-ci.test.cjs
- app/scripts/test-tree-shaking.cjs
- app/scripts/bundle-analyze-ci.cjs
- app/src/types/svg.d.ts
- app/scripts/tests/tree-shaking.test.cjs
- app/scripts/test-e2e-local.sh
- app/scripts/analyze-tree-shaking.cjs
- app/scripts/tests/mobile-deploy-confirm-module.test.cjs
🧰 Additional context used
🪛 RuboCop (1.76.1)
app/fastlane/helpers/ios.rb
[convention] 13-13: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 69-69: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 75-75: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
Summary
Testing
yarn workspace @selfxyz/mobile-sdk-alpha niceyarn workspace @selfxyz/common nice(fails: Require statement not part of import statement)yarn workspace @selfxyz/mobile-app nice(fails: 19 errors)yarn lintyarn buildyarn workspace @selfxyz/contracts build(fails: Invalid account: #0 for network: mainnet - Expected string, received undefined)yarn typesyarn workspace @selfxyz/common testyarn workspace @selfxyz/circuits test(fails: Unsupported signature algorithm: undefined)yarn workspace @selfxyz/mobile-app testyarn workspace @selfxyz/mobile-sdk-alpha testrg --files-without-match "SPDX-License-Identifier: BUSL-1.1" -g '*.ts' -g '*.tsx' -g '*.js' -g '*.cjs' -g '*.kt' -g '*.java' -g '*.rb' -g '*.sh' -g '!android/**' apphttps://chatgpt.com/codex/tasks/task_b_68990600bbc4832d900feaf96d98da46
Summary by CodeRabbit