Skip to content

Include locations in all pedantic warnings#1568

Merged
WardBrian merged 3 commits intomasterfrom
feat/pedantic-warnings-filename
Oct 30, 2025
Merged

Include locations in all pedantic warnings#1568
WardBrian merged 3 commits intomasterfrom
feat/pedantic-warnings-filename

Conversation

@WardBrian
Copy link
Copy Markdown
Member

@WardBrian WardBrian commented Oct 30, 2025

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

All warnings from pedantic mode will now have a location associated with them.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian requested a review from nhuurre October 30, 2025 16:44
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@8317595). Learn more about missing BASE report.
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/analysis_and_optimization/Mir_utils.ml 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1568   +/-   ##
=========================================
  Coverage          ?   90.27%           
=========================================
  Files             ?       65           
  Lines             ?     9997           
  Branches          ?        0           
=========================================
  Hits              ?     9025           
  Misses            ?      972           
  Partials          ?        0           
Files with missing lines Coverage Δ
src/analysis_and_optimization/Dataflow_utils.ml 100.00% <ø> (ø)
src/analysis_and_optimization/Factor_graph.ml 70.94% <100.00%> (ø)
src/analysis_and_optimization/Pedantic_analysis.ml 95.08% <100.00%> (ø)
src/middle/Location.ml 95.65% <100.00%> (ø)
src/analysis_and_optimization/Mir_utils.ml 76.05% <85.71%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@nhuurre nhuurre left a comment

Choose a reason for hiding this comment

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

You write "when the exact location of a warning is not clear" but in my opinion these warnings do have pretty clear locations; it's always the location of the relevant parameter declaration.
Make Mir_utils.parameter_set return the location spans in addition to the names and that should fix the warnings about unused parameters and hard constraints.
The warning about multiple priors (or "non-one prior" as the code calls it...) may be a bit trickier.

@WardBrian
Copy link
Copy Markdown
Member Author

That's a good point. Even the more than one prior warning can reasonably just point to the line of the parameter being declared and call it a day

@WardBrian WardBrian requested a review from nhuurre October 30, 2025 19:41
@WardBrian WardBrian changed the title Include filename even when exact location of warning is unclear Include locations in all pedantic warnings Oct 30, 2025
Copy link
Copy Markdown
Collaborator

@nhuurre nhuurre left a comment

Choose a reason for hiding this comment

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

Update release notes.

@WardBrian WardBrian merged commit 25ac971 into master Oct 30, 2025
3 checks passed
@WardBrian WardBrian deleted the feat/pedantic-warnings-filename branch October 30, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants