Skip to content

Reduce clint error message verbosity by consolidating README instructions#19155

Merged
harupy merged 4 commits intomasterfrom
copilot/reduce-error-message-verbosity
Dec 2, 2025
Merged

Reduce clint error message verbosity by consolidating README instructions#19155
harupy merged 4 commits intomasterfrom
copilot/reduce-error-message-verbosity

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

The clint linter appended "See dev/clint/README.md for instructions on ignoring this rule (<rule_name>)." after each error, creating excessive verbosity with multiple violations.

Changes:

  • Removed README reference from individual Violation.__str__() output in linter.py
  • Added single README message after error count in __init__.py with proper singular/plural grammar
  • Combined the error count and README instruction into a single print() statement for cleaner code

Before:

file.py:2:1: MLF0003: Unordered parameters See dev/clint/README.md for instructions on ignoring this rule (docstring-param-order).
file.py:12:1: MLF0003: Unordered parameters See dev/clint/README.md for instructions on ignoring this rule (docstring-param-order).
Found 2 errors

After:

file.py:2:1: MLF0003: Unordered parameters
file.py:12:1: MLF0003: Unordered parameters
Found 2 errors
See dev/clint/README.md for instructions on ignoring these rules.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

All 189 clint tests pass. Manually verified output for single error, multiple errors, and no errors cases.

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

Clint linter now shows README instructions once after the error summary instead of repeating them on each error line, reducing output verbosity.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)
Original prompt

clint appends See dev/clint/README.md for instructions on ignoring this rule ... after each error, but it's too verbose. Append the message after Found <N> errors here:

print(f"Found {count} {label}", file=sys.stderr)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@harupy harupy marked this pull request as ready for review December 2, 2025 08:07
Move "See dev/clint/README.md..." message from individual errors to after the "Found N errors" summary. This makes the output much more concise when multiple errors are present.

Before:
  file.py:2:1: MLF0003: Error message See dev/clint/README.md for instructions on ignoring this rule (rule-name).
  file.py:12:1: MLF0003: Error message See dev/clint/README.md for instructions on ignoring this rule (rule-name).
  Found 2 errors

After:
  file.py:2:1: MLF0003: Error message
  file.py:12:1: MLF0003: Error message
  Found 2 errors
  See dev/clint/README.md for instructions on ignoring these rules.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Updated the README reference message to use "this rule" for single errors and "these rules" for multiple errors, improving grammar consistency.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Update clint error message format Reduce clint error message verbosity by consolidating README instructions Dec 2, 2025
Copilot AI requested a review from harupy December 2, 2025 08:19
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/bug-fix Mention under Bug Fixes in Changelogs. labels Dec 2, 2025
Combined the two separate print statements into a single print statement with a newline separator, making the code more concise.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy removed the v3.7.0 label Dec 2, 2025
@harupy harupy enabled auto-merge December 2, 2025 08:44
@harupy harupy added this pull request to the merge queue Dec 2, 2025
Merged via the queue into master with commit ef0399b Dec 2, 2025
63 of 81 checks passed
@harupy harupy deleted the copilot/reduce-error-message-verbosity branch December 2, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow rn/bug-fix Mention under Bug Fixes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants