fix: false positive in DL3022#900
Merged
lorenzo merged 4 commits intohadolint:masterfrom Nov 16, 2022
swarnimarun:patch-1
Merged
fix: false positive in DL3022#900lorenzo merged 4 commits intohadolint:masterfrom swarnimarun:patch-1
DL3022#900lorenzo merged 4 commits intohadolint:masterfrom
swarnimarun:patch-1
Conversation
Contributor
Author
|
sorry had to add another test as I remembered this case was broken, also fixed it :P fixed it with a bit of hack ( |
Member
|
I would change the state to be able to store numbers as well. It feels messy having to parse a number each time you want to check the state. Do you think you can make that change? |
Contributor
Author
|
@lorenzo let me know if it's fine now, not that good at Haskell. But tried to follow project conventions. I couldn't come up with anything more beautiful so feel free to make edits. :P |
Contributor
Author
|
Also sorry if I don't follow up immediately a bit loaded on the work side of life. |
Member
|
looks great, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Simple patch to fix bug with hadolint raising false positives if the stages are mentioned by index rather than names.
Such as,
How I did it
I use decimal conversion over string to get the index and compare it to the count of the stages in source, not sure if there was a better way to write the code I just wrote it because I needed it to be fixed.
How to verify it
Added a couple tests to
DL3022Spec.hsNote: Let me know if there are any mistakes I will fix em. Though as it's a weekend I might not always be available.