Skip to content

Commit 8147c85

Browse files
committed
setup ruby linter
1 parent f09c2e8 commit 8147c85

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/lint-and-validate.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,30 @@ jobs:
3939
- '**/*.tsx'
4040
- '.github/workflows/lint-and-validate.yml'
4141
kotlin:
42-
- 'packages/gradle-client/**'
42+
- 'packages/build-tools/gradle-plugin/**'
4343
- '.github/workflows/lint-and-validate.yml'
4444
json:
4545
- '*.json'
4646
- '.github/workflows/lint-and-validate.yml'
47+
ruby:
48+
- 'packages/build-tools/cocoapods-plugin/**'
49+
- '.github/workflows/lint-and-validate.yml'
4750
4851
- name: 🏗 Setup Bun
4952
uses: oven-sh/setup-bun@v1
5053
with:
5154
bun-version: latest
5255

56+
- name: 🏗 Setup Ruby
57+
if: ${{ steps.filter.outputs.ruby == 'true' }}
58+
uses: ruby/setup-ruby@v1
59+
with:
60+
ruby-version: '3.0'
61+
62+
- name: 🏗 Install rubocop
63+
if: ${{ steps.filter.outputs.ruby == 'true' }}
64+
run: gem install rubocop
65+
5366
- name: 🗃️ Cache Bun and Gradle
5467
uses: actions/cache@v4
5568
with:
@@ -72,6 +85,10 @@ jobs:
7285
if: ${{ steps.filter.outputs.typescript == 'true' }}
7386
run: bun run lint-ts
7487

88+
- name: 🔍 Lint ruby
89+
if: ${{ steps.filter.outputs.ruby == 'true' }}
90+
run: bun run lint-ruby
91+
7592
- name: ✅ Validate JSON files
7693
if: ${{ steps.filter.outputs.json == 'true' }}
7794
run: bun run validate

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"validate": "bun run packages/config/src/validate.ts",
1515
"lint-gradle-client": "./packages/build-tools/gradle-plugin/gradlew -p packages/build-tools/gradle-plugin spotlessCheck -q --no-daemon",
1616
"lint-ts": "eslint . --ext .ts,.tsx",
17+
"lint-ruby": "rubocop packages/build-tools/cocoapods-plugin",
1718
"test-gradle-client": "./packages/build-tools/gradle-plugin/gradlew -p packages/build-tools/gradle-plugin test --info --no-daemon"
1819
},
1920
"author": "",

packages/build-tools/cocoapods-plugin/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,14 @@ node_modules/
7373
│ └── {package-name}.xcframework/
7474
└── Current/ (symlink created at build time → Debug or Release)
7575
```
76+
77+
### Lint
78+
79+
To run the linter, use the following command:
80+
81+
```bash
82+
# Install rubocop if you don't have it yet
83+
gem install rubocop
84+
# Run
85+
rubocop
86+
```

0 commit comments

Comments
 (0)