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

Add option for ignoring values #141

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

j-buczak
Copy link
Contributor

Ignoring is set up using # -- @ignored tag

Disclosure: this is my first code written in go - suggestions are more than welcome :)

Ignoring is set up using `# -- @ignored` tag
pkg/helm/chart_info.go Outdated Show resolved Hide resolved
Replace `# -- @ignore` with simple `@ignore`
if !strings.Contains(node.HeadComment, "@ignore") {
removeIgnored(node, node.Kind)
newContent = append(newContent, node)
} else if parentKind == yaml.MappingNode {
Copy link

Choose a reason for hiding this comment

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

Based on your comment below, it seems this should be a separate if block and not part of the prior if?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be reworded to:
if HeadComment contains @ignore don't include it in newContent. If root node is MappingNode don't include the next node as well

Copy link

Choose a reason for hiding this comment

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

oh! I see what you're saying...

@norwoodj norwoodj merged commit 935a760 into norwoodj:master Jun 29, 2022
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.

3 participants