Skip to content

chore: update local lint task to only lint changed files#851

Merged
ctreatma merged 1 commit into
mainfrom
lint-config
Feb 5, 2025
Merged

chore: update local lint task to only lint changed files#851
ctreatma merged 1 commit into
mainfrom
lint-config

Conversation

@ctreatma
Copy link
Copy Markdown
Contributor

@ctreatma ctreatma commented Feb 4, 2025

Since we might periodically change linter configuration, as done in #849, we should keep the existing PR validation behavior that only lints the files that were changed in a particular PR. This will allow us to continue to avoid unnecessarily large PRs to fix linting failures if and when the linter configuration changes.

If we're keeping the current, limited PR validation behavior, we should use the same behavior for the make lint task to that developers can easily identify the minimum necessary changes locally. This updates the make lint task to only lint files that have been changed since origin/main, which should closely approximate the behavior of the PR validation workflow.

@ctreatma ctreatma marked this pull request as ready for review February 4, 2025 19:07
@ctreatma ctreatma requested review from a team as code owners February 4, 2025 19:07
Copy link
Copy Markdown
Contributor

@thogarty thogarty left a comment

Choose a reason for hiding this comment

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

LGTM. I tested locally as well. Thanks, @ctreatma !

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.03%. Comparing base (432b381) to head (e3e4396).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #851   +/-   ##
=======================================
  Coverage   35.03%   35.03%           
=======================================
  Files         187      187           
  Lines       24846    24846           
=======================================
  Hits         8704     8704           
  Misses      15995    15995           
  Partials      147      147           

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

@ctreatma ctreatma merged commit 0e3cd17 into main Feb 5, 2025
@ctreatma ctreatma deleted the lint-config branch February 5, 2025 18:55
@github-actions
Copy link
Copy Markdown

This PR is included in version 3.2.0 🎉

kpdhulipala pushed a commit to kpdhulipala/terraform-provider-equinix that referenced this pull request Mar 24, 2025
Since we might periodically change linter configuration, as done in
equinix#849, we should keep the existing PR validation behavior that only lints
the files that were changed in a particular PR. This will allow us to
continue to avoid unnecessarily large PRs to fix linting failures if and
when the linter configuration changes.

If we're keeping the current, limited PR validation behavior, we should
use the same behavior for the `make lint` task to that developers can
easily identify the minimum necessary changes locally. This updates the
`make lint` task to only lint files that have been changed since
`origin/main`, which should closely approximate the behavior of the PR
validation workflow.
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