Skip to content

Commit 0064899

Browse files
authored
Add lostconf to CI (#72)
* Add lostconf to CI Add lostconf job to detect stale configuration patterns in .rubocop.yml and .yard-lint.yml files. This helps maintain config hygiene by catching exclude patterns that no longer match any files. Changes: - Add package.json with lostconf dependency - Add lostconf CI job to workflow - Add package.json to Renovate includePaths * Fix stale patterns in config files
1 parent 3931dd8 commit 0064899

File tree

6 files changed

+361
-16
lines changed

6 files changed

+361
-16
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,31 @@ jobs:
6868
- name: Run yard-lint
6969
run: bundle exec yard-lint lib/
7070

71+
lostconf:
72+
timeout-minutes: 5
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
76+
with:
77+
fetch-depth: 0
78+
- name: Set up Node.js
79+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
80+
with:
81+
node-version: '20'
82+
cache: 'npm'
83+
- name: Install dependencies
84+
run: npm ci
85+
- name: Run lostconf
86+
run: npx lostconf --fail-on-stale
87+
7188
ci-success:
7289
name: CI Success
7390
runs-on: ubuntu-latest
7491
if: always()
7592
needs:
7693
- specs
7794
- yard-lint
95+
- lostconf
7896
steps:
7997
- name: Check all jobs passed
8098
if: |

.rubocop.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,25 @@ Style/StringLiterals:
1111

1212
Layout/LineLength:
1313
Max: 120
14-
Exclude:
15-
- 'lib/llms_txt/cli.rb'
1614

1715
Metrics/ClassLength:
1816
Max: 200
19-
Exclude:
20-
- 'lib/llms_txt/cli.rb'
2117

2218
Metrics/MethodLength:
2319
Max: 35
24-
Exclude:
25-
- 'lib/llms_txt/cli.rb'
2620

2721
Metrics/AbcSize:
2822
Max: 40
29-
Exclude:
30-
- 'lib/llms_txt/cli.rb'
3123

3224
Metrics/CyclomaticComplexity:
3325
Max: 15
34-
Exclude:
35-
- 'lib/llms_txt/config.rb'
3626

3727
Metrics/PerceivedComplexity:
3828
Max: 15
39-
Exclude:
40-
- 'lib/llms_txt/config.rb'
4129

4230
Metrics/BlockLength:
4331
Exclude:
4432
- 'spec/**/*'
45-
- 'lib/llms_txt/cli.rb'
4633
- '*.gemspec'
4734

4835
Style/FrozenStringLiteralComment:

.yard-lint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ AllValidators:
77
- "--private"
88
- "--protected"
99
Exclude:
10-
- "\\.git"
10+
- .git/**/*
1111
- vendor/**/*
1212
- node_modules/**/*
1313
- spec/**/*
14-
- test/**/*
1514
FailOnSeverity: convention
1615
MinCoverage: 99.0
1716
DiffMode:

0 commit comments

Comments
 (0)