server icon indicating copy to clipboard operation
server copied to clipboard

Holistic local linting with Mega-Linter

Open withinfocus opened this issue 7 months ago â€ĸ 3 comments

đŸŽŸī¸ Tracking

Internal change.

📔 Objective

We are doing more than ever in this repo and are now even bringing documentation into README files, placing more demands on getting content well-formed and checked. We have experimented with the MegaLinter for quite some time and there is a case to use it across all our repos for basic formatting checks at a minimum, with the option to use their larger "flavors" as desired for even more linting. I will skip over the rationale and overview of that system, and in the end it brings a total linting package to us that we don't have to maintain, getting all its benefits rather effortlessly.

This change aims to try the formatters flavor out with both local linting and PR-based feedback. This flavor does not include much beyond basic ... format checks. When run locally, the pre-commit hook will take ~10 seconds to invoke the runner to give feedback -- this does have an expense, but fixes will be applied automatically. The online run just gives PR feedback; there is a way to also have it apply changes, but keeping that out of scope, at least for now. Only changed files are linted.

dotnet format was the only linter used here, and that's included in the formatters flavor as well as several others.

Should this be accepted and trialed, we can proceed with a more template-based introduction.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or â„šī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or âš ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

withinfocus avatar Jun 07 '25 14:06 withinfocus

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 50.36%. Comparing base (d2577f6) to head (068e463).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5938   +/-   ##
=======================================
  Coverage   50.36%   50.36%           
=======================================
  Files        1853     1853           
  Lines       82339    82339           
  Branches     7259     7259           
=======================================
  Hits        41468    41468           
  Misses      39291    39291           
  Partials     1580     1580           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 07 '25 15:06 codecov[bot]

Logo Checkmarx One – Scan Summary & Details – 4954c98d-89ec-46c9-8fc6-2b066d5fe446

Great job! No new security vulnerabilities introduced in this pull request

github-actions[bot] avatar Jun 07 '25 15:06 github-actions[bot]