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

Ignore GStringExpressionWithinString when inside of sh step (Jenkinsfile) #143

Closed
felipecrs opened this issue Dec 14, 2020 · 2 comments · Fixed by #140
Closed

Ignore GStringExpressionWithinString when inside of sh step (Jenkinsfile) #143

felipecrs opened this issue Dec 14, 2020 · 2 comments · Fixed by #140

Comments

@felipecrs
Copy link
Contributor

I'm not sure if this is doable or not, but it would be great if this rule could be automatically ignored when checking for GStrings expressions within sh steps in Jenkinsfiles, since they actually mean environment variables accessible by the shell interpreter.

E.g.:

sh '''
echo $SHELL
'''
@nvuillam
Copy link
Owner

That seems to be a false positive... maybe we could ignore it just for jenkinsfile ?

@felipecrs
Copy link
Contributor Author

felipecrs commented Dec 14, 2020

That seems to be a false positive... maybe we could ignore it just for jenkinsfile ?

This is what I do currently, but it would be more assertive if we could ignore it only for the sh steps. Should I create a PR excluding this rule from the jenkinsfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants