Skip to content

Conversation

@aemous
Copy link
Contributor

@aemous aemous commented Nov 20, 2025

Description of changes:

  • Updated interactive and auto-fix mode to support multiple linting rules. The main technical complexity with supporting multiple rules is that as we apply fixes to the script, older linter findings become stale and would need to be
    'refreshed'. We avoid this problem by linting the script one-rule-at-a-time.
  • Updated Base64BinaryFormatRule so that it does not require file:// prefix in an argument value to trigger a detection. It now flags all AWS CLI commands.
  • Added PaginationRule that flags all AWS CLI commands, and adds --no-cli-paginate as a fix.
  • Replaced ScriptLinter class with utility functions. Updated their interface to let callers pass in their own AST.
  • Added save and exit mode.
  • Added tests for save-and-exit mode and the new PaginationRule.
  • Misc. refactoring for maintainability/readability.

Description of tests:

  • Ran and passed all tests.
  • Manually tested the tool in interactive and auto-fix mode on the example script, and verified correct behavior.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous aemous changed the title Multiple linting rules testeiifcbncfctiknvurhjditvnhjuvkbrvenhvngirvjgi Multiple linting rules test Nov 20, 2025
@aemous aemous changed the title Multiple linting rules test Support multiple linting rules Nov 20, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.33%. Comparing base (7854fa9) to head (d90bfde).
⚠️ Report is 1 commits behind head on upgrade-linting-tool.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           upgrade-linting-tool    #9859   +/-   ##
=====================================================
  Coverage                 93.33%   93.33%           
=====================================================
  Files                       209      209           
  Lines                     16807    16807           
=====================================================
  Hits                      15687    15687           
  Misses                     1120     1120           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aemous aemous marked this pull request as ready for review November 20, 2025 17:01
@aemous
Copy link
Contributor Author

aemous commented Dec 3, 2025

Just a note, the pagination linting rule should actually be based around the --no-cli-pager argument instead of the --no-paginate argument. This will be addressed in a follow-up PR, I already have the fix staged locally with the next round of changes.

Copy link
Member

@kdaily kdaily left a comment

Choose a reason for hiding this comment

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

Thanks, nice work so far! Mostly a few basic comments and suggestions.

I think the biggest feedback is the main() method is quite long and a bit hard to follow. I would recommend breaking it out into a few helpers to clarify the branching behavior a bit better.

@aemous aemous requested a review from kdaily December 17, 2025 18:03
@aemous aemous merged commit e2edf82 into aws:upgrade-linting-tool Dec 18, 2025
48 checks passed
aemous added a commit that referenced this pull request Jan 5, 2026
Includes all changes from #9803, #9859, #9936, #9948, and #9953.
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.

3 participants