Skip to content

[Merged by Bors] - fix(Linter/TextBased): don't flag "see adaptation note" comments#35668

Closed
kim-em wants to merge 1 commit intomasterfrom
fix-adaptation-note-linter
Closed

[Merged by Bors] - fix(Linter/TextBased): don't flag "see adaptation note" comments#35668
kim-em wants to merge 1 commit intomasterfrom
fix-adaptation-note-linter

Conversation

@kim-em
Copy link
Contributor

@kim-em kim-em commented Feb 23, 2026

This PR fixes the adaptationNoteLinter which was matching any line containing the substring "daptation note", causing false positives on lines like:

#adaptation_note /-- The maxHeartbeats bump is required after leanprover/lean4#12564. -/
set_option maxHeartbeats 400000 in -- see adaptation note

The linter now excludes lines containing #adaptation_note (correct usage) and see adaptation note (cross-references to a nearby #adaptation_note command).

See https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/22289522784/job/64474181031 for all 8 false positives, all of this form.

🤖 Prepared with Claude Code

The `adaptationNoteLinter` was matching any line containing the
substring "daptation note", which caused false positives on lines
like `set_option maxHeartbeats 400000 in -- see adaptation note`
that merely reference a nearby `#adaptation_note` command.

Exclude lines containing `#adaptation_note` (correct usage) and
lines containing `see adaptation note` (cross-references).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

PR summary 699a55a4e2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for scripts/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-linter Linter label Feb 23, 2026
Copy link
Contributor

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@mathlib-triage mathlib-triage bot added the ready-to-merge This PR has been sent to bors. label Feb 23, 2026
mathlib-bors bot pushed a commit that referenced this pull request Feb 23, 2026
)

This PR fixes the `adaptationNoteLinter` which was matching any line containing the substring `"daptation note"`, causing false positives on lines like:

```lean
#adaptation_note /-- The maxHeartbeats bump is required after leanprover/lean4#12564. -/
set_option maxHeartbeats 400000 in -- see adaptation note
```

The linter now excludes lines containing `#adaptation_note` (correct usage) and `see adaptation note` (cross-references to a nearby `#adaptation_note` command).

See https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/22289522784/job/64474181031 for all 8 false positives, all of this form.

🤖 Prepared with Claude Code
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 23, 2026

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 23, 2026
)

This PR fixes the `adaptationNoteLinter` which was matching any line containing the substring `"daptation note"`, causing false positives on lines like:

```lean
#adaptation_note /-- The maxHeartbeats bump is required after leanprover/lean4#12564. -/
set_option maxHeartbeats 400000 in -- see adaptation note
```

The linter now excludes lines containing `#adaptation_note` (correct usage) and `see adaptation note` (cross-references to a nearby `#adaptation_note` command).

See https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/22289522784/job/64474181031 for all 8 false positives, all of this form.

🤖 Prepared with Claude Code
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 23, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title fix(Linter/TextBased): don't flag "see adaptation note" comments [Merged by Bors] - fix(Linter/TextBased): don't flag "see adaptation note" comments Feb 23, 2026
@mathlib-bors mathlib-bors bot closed this Feb 23, 2026
@mathlib-bors mathlib-bors bot deleted the fix-adaptation-note-linter branch February 23, 2026 19:11
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Mar 2, 2026
…nprover-community#35668)

This PR fixes the `adaptationNoteLinter` which was matching any line containing the substring `"daptation note"`, causing false positives on lines like:

```lean
#adaptation_note /-- The maxHeartbeats bump is required after leanprover/lean4#12564. -/
set_option maxHeartbeats 400000 in -- see adaptation note
```

The linter now excludes lines containing `#adaptation_note` (correct usage) and `see adaptation note` (cross-references to a nearby `#adaptation_note` command).

See https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/22289522784/job/64474181031 for all 8 false positives, all of this form.

🤖 Prepared with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-linter Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants