carson 2.16.0 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c0c99d97f1939fc304d067069e80b38319192a67c738ecfb2358d78e22bc5c6
4
- data.tar.gz: 2233f42b74551f7cea4445130c4a5acd06f47839bc27288673f9c60792c9659d
3
+ metadata.gz: beed85a11e303c6c34258e51b20d553ea4becdfcc22c9cc28bb7889621a25eac
4
+ data.tar.gz: d59f7bb131cc1f15bc90f4c8bebf1d6a58f361bbfeec960827460a6144bab6bc
5
5
  SHA512:
6
- metadata.gz: c03226c3e685b672675e6aee16e4027d3f4ffb992a9ad6894a971a6c079d0f0f6c749e0806605109a588805788aa73f6e1c23aa0cec5ab448ee7d48f1c5c63c5
7
- data.tar.gz: c9587d82f0b6f75fe0146d74da495e229486a49d4fb39fc3b3a6e774391dbb6439f099f2f2474b2cf603a49c9eaf1ffeaaf416f2baf49f0ab303b6fcfd17c930
6
+ metadata.gz: 9c554db7a64b8d9ef314c3e26a2be21623e37972dd12fb39093d3e9a2ae71f19f53c5e8a313a72b89de6eba8bbb8943fde3b5bbcc8f8123d4d051de839afa315
7
+ data.tar.gz: 67bd246d6dfcd97efcf521278198fb6040a734115a5f3b5b9b4aef9c72ae4e9598f3e4e9f22470b2846b967d028ee9a1a52e1f4e73835afd2a61530eff375ad3
data/RELEASE.md CHANGED
@@ -5,6 +5,30 @@ Release-note scope rule:
5
5
  - `RELEASE.md` records only version deltas, breaking changes, and migration actions.
6
6
  - Operational usage guides live in `MANUAL.md` and `API.md`.
7
7
 
8
+ ## 2.17.0 — MegaLinter Configuration Template
9
+
10
+ ### What changed
11
+
12
+ - Added `.mega-linter.yml` as a Carson-managed template, deployed to `.github/.mega-linter.yml` in governed repositories. Previously MegaLinter ran with its own defaults, ignoring project-level configs and producing thousands of false positives.
13
+ - **Project configs first**: `LINTER_RULES_PATH: "."` tells MegaLinter to use project-root config files (`.rubocop.yml`, `.eslintrc`, etc.) instead of built-in defaults. Fixes the RuboCop indentation mismatch.
14
+ - **Vendor exclusions**: `FILTER_REGEX_EXCLUDE` skips `vendor/`, `node_modules/`, `public/packs`, `public/assets`, `tmp/`, `log/`, and `coverage/`.
15
+ - **Noisy linters disabled**: `SPELL_CSPELL` (needs per-project dictionary), `COPYPASTE_JSCPD` (false positives on generated code), `HTML_DJLINT` (designed for Jinja, not ERB).
16
+ - Updated `carson-lint.yml` workflow with `MEGALINTER_CONFIG: .github/.mega-linter.yml` to point MegaLinter at the non-default config location.
17
+
18
+ ### Migration
19
+
20
+ Run `carson refresh` — the new template is applied automatically and propagated to governed repos.
21
+
22
+ ## 2.16.1 — Template Propagation Cleanup Fix
23
+
24
+ ### What changed
25
+
26
+ - Template propagation now deletes the local `carson/template-sync` branch after worktree cleanup. Previously, the worktree was removed but the local branch it created was left behind in the governed repository, polluting the user's branch list.
27
+
28
+ ### No migration required
29
+
30
+ Run `carson refresh` — the fix takes effect immediately. Stale `carson/template-sync` branches in governed repos can be removed with `git branch -D carson/template-sync`.
31
+
8
32
  ## 2.16.0 — Auto-propagate Template Changes
9
33
 
10
34
  ### What changed
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.16.0
1
+ 2.17.0
data/lib/carson/config.rb CHANGED
@@ -48,7 +48,7 @@ module Carson
48
48
  }
49
49
  },
50
50
  "template" => {
51
- "managed_files" => [ ".github/carson.md", ".github/copilot-instructions.md", ".github/CLAUDE.md", ".github/AGENTS.md", ".github/pull_request_template.md", ".github/workflows/carson-lint.yml" ],
51
+ "managed_files" => [ ".github/carson.md", ".github/copilot-instructions.md", ".github/CLAUDE.md", ".github/AGENTS.md", ".github/pull_request_template.md", ".github/workflows/carson-lint.yml", ".github/.mega-linter.yml" ],
52
52
  "superseded_files" => [ ".github/carson-instructions.md" ]
53
53
  },
54
54
  "lint" => {
@@ -591,10 +591,11 @@ module Carson
591
591
  pr_url
592
592
  end
593
593
 
594
- # Removes the worktree regardless of state.
594
+ # Removes the worktree and the local sync branch it created.
595
595
  def template_propagate_cleanup!( worktree_dir: )
596
596
  git_run( "worktree", "remove", "--force", worktree_dir )
597
- puts_verbose "template_propagate: worktree cleaned up"
597
+ git_run( "branch", "-D", TEMPLATE_SYNC_BRANCH )
598
+ puts_verbose "template_propagate: worktree and local branch cleaned up"
598
599
  rescue StandardError => e
599
600
  puts_verbose "template_propagate: cleanup warning (#{e.message})"
600
601
  end
@@ -0,0 +1,19 @@
1
+ # Carson-managed MegaLinter configuration.
2
+ # Pushed to governed repositories by `carson template apply`.
3
+ # To override, add entries to a local .mega-linter.yml — MegaLinter merges both.
4
+
5
+ # Use project-root linter configs (.rubocop.yml, .eslintrc, etc.)
6
+ # instead of MegaLinter's built-in defaults.
7
+ LINTER_RULES_PATH: "."
8
+
9
+ # Only lint changed files on PRs, not the entire codebase.
10
+ VALIDATE_ALL_CODEBASE: false
11
+
12
+ # Exclude vendored, generated, and dependency directories.
13
+ FILTER_REGEX_EXCLUDE: "(vendor/|node_modules/|public/packs|public/assets|tmp/|log/|coverage/)"
14
+
15
+ # Disable linters that are too noisy without per-project configuration.
16
+ DISABLE_LINTERS:
17
+ - SPELL_CSPELL
18
+ - COPYPASTE_JSCPD
19
+ - HTML_DJLINT
@@ -18,5 +18,6 @@ jobs:
18
18
  fetch-depth: 0
19
19
  - uses: oxsecurity/megalinter@v8
20
20
  env:
21
+ MEGALINTER_CONFIG: .github/.mega-linter.yml
21
22
  VALIDATE_ALL_CODEBASE: false
22
23
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carson
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hailei Wang
@@ -63,6 +63,7 @@ files:
63
63
  - lib/carson/runtime/review/utility.rb
64
64
  - lib/carson/runtime/setup.rb
65
65
  - lib/carson/version.rb
66
+ - templates/.github/.mega-linter.yml
66
67
  - templates/.github/AGENTS.md
67
68
  - templates/.github/CLAUDE.md
68
69
  - templates/.github/carson.md