Skip to content

fix(@angular-devkit/build-angular): fix duplicate lint messages #11636

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

Merged
merged 1 commit into from
Jul 24, 2018
Merged

fix(@angular-devkit/build-angular): fix duplicate lint messages #11636

merged 1 commit into from
Jul 24, 2018

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Jul 24, 2018

Closes #11633

Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

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

Just blocking it until a repro is shown in the original issue.

@filipesilva
Copy link
Contributor

I think you can repro if you update the lint target of the test project to this:

        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "src/tsconfig.app.json",
              "src/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        },

To fix the problem you'd need to dedupe the result array before reading it around

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Jul 24, 2018 via email

@alan-agius4 alan-agius4 changed the title test(@angular-devkit/build-angular): add unit test for issue #11633 fix(@angular-devkit/build-angular): fix duplicate lint messages Jul 24, 2018
runTargetSpec(host, tslintTargetSpec, undefined, DefaultTimeout, logger).pipe(
tap((buildEvent) => expect(buildEvent.success).toBe(false)),
tap(() => {
// this is to make sure there are no duplicates
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is due that duplicate messages are within the same entry since under the hood we are using tslint formatter to format the messages with will convert and array of results to a string

Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking this on!

@filipesilva filipesilva merged commit 9295217 into angular:master Jul 24, 2018
@alan-agius4 alan-agius4 deleted the test_cli-lint branch July 24, 2018 11:53
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng lint shows all errors twice
3 participants