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

Fail on error also in case of no lint config present #4658

Merged
merged 7 commits into from
Mar 25, 2024
Merged

Conversation

o-liver
Copy link
Member

@o-liver o-liver commented Nov 6, 2023

Changes

  • Tests
  • Documentation

@o-liver o-liver requested a review from a team as a code owner November 6, 2023 15:24
@o-liver
Copy link
Member Author

o-liver commented Nov 24, 2023

/it

@o-liver
Copy link
Member Author

o-liver commented Nov 27, 2023

/it

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@srinikitha09
Copy link
Contributor

Can we have some unit tests for this?

@o-liver
Copy link
Member Author

o-liver commented Dec 1, 2023

Can we have some unit tests for this?

I will see what I can do, yes

@o-liver
Copy link
Member Author

o-liver commented Jan 10, 2024

/it

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

Thank you for your contribution! This pull request is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

@github-actions github-actions bot added the stale marks stale issues and pull requests label Mar 11, 2024
@o-liver o-liver removed the stale marks stale issues and pull requests label Mar 21, 2024
@o-liver
Copy link
Member Author

o-liver commented Mar 22, 2024

Can we have some unit tests for this?

Done.


t.Run("Test npx eslint fail", func(t *testing.T) {
lintUtils := newLintMockUtilsBundle()
lintUtils.execRunner = &mock.ExecMockRunner{ShouldFailOnCommand: map[string]error{"npx --no-install eslint . --ext .js,.jsx,.ts,.tsx -c .pipeline/.eslintrc.json -f checkstyle --ignore-pattern .eslintrc.js -o ./defaultlint.xml": errors.New("exit 1")}}
Copy link
Contributor

@srinikitha09 srinikitha09 Mar 25, 2024

Choose a reason for hiding this comment

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

[MINOR] Probably we can break this line into 2.

Copy link
Contributor

@srinikitha09 srinikitha09 left a comment

Choose a reason for hiding this comment

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

Thanks! looks good

@o-liver o-liver enabled auto-merge (squash) March 25, 2024 14:05
@o-liver
Copy link
Member Author

o-liver commented Mar 25, 2024

/it

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@o-liver o-liver merged commit f6a3bbe into master Mar 25, 2024
12 of 13 checks passed
@o-liver o-liver deleted the lintError branch March 25, 2024 14:13
@o-liver o-liver self-assigned this Apr 8, 2024
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
* Fail on error also in case of no lint config present

* Fix errors

* test: add unit test
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