Skip to content

Commit 5864112

Browse files
committed
fix De Morgan's law issues
1 parent 64d387d commit 5864112

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/cli/output_opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (opts *OutputOpts) IsJSONPathOutput() bool {
8383
}
8484

8585
func (opts *OutputOpts) IsPlainOutput() bool {
86-
return !(opts.IsJSONOutput() || opts.IsGoTemplate() || opts.IsJSONPathOutput())
86+
return !opts.IsJSONOutput() && !opts.IsGoTemplate() && !opts.IsJSONPathOutput()
8787
}
8888

8989
// ConfigWriter returns the io.Writer.

tools/templates-checker/astparsing/astparsing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func getRelatedTemplateFromCallExpr(pkg *packages.Package, callExpr *ast.CallExp
369369

370370
// If there's a string literal that's not a template ignore it
371371
case *ast.BasicLit:
372-
if !(strings.Contains(templateArg.Value, "{{") && strings.Contains(templateArg.Value, "}}")) {
372+
if !strings.Contains(templateArg.Value, "{{") || !strings.Contains(templateArg.Value, "}}") {
373373
return nil, nil
374374
}
375375
}

0 commit comments

Comments
 (0)