Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(lint): use changed lines instead of changed files to avoid false positives. #5950

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Nov 7, 2024

Problem

Currently jscpd ci action filters on changed files in PR. This results in clones being returned from changes outside our changes (but within the same files).

jscpd is the most commonly failing CI task at the moment, so to keep CI green we want to reduce false positives.

Solution

  • jscpd only lists clones that includes lines from the changed lines in the changed files.
  • see https://github.com/aws/aws-toolkit-vscode/actions/runs/11799554967/job/32868336302?pr=5950 as an example failure.
  • Included in this PR is a refactor of the action to simplify the bash scripting done in the action yml file.
  • Also modifies action file to include manual "local" switch so that it can be run locally. (this was broken before)
  • Some tests for the filterDuplicates.ts script to make future changes easier.

License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

This comment was marked as resolved.

@Hweinstock Hweinstock changed the title build(lint): use changed lines instead of changed files to avoid false positives (WIP IGNORE) build(lint): use changed lines instead of changed files to avoid false positives. Nov 12, 2024
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.

1 participant