Skip to content

Commit 4beccdf

Browse files
committed
Fixed linter warning
commands/service_compile.go:162:5: QF1001: could apply De Morgan's law (staticcheck) if !(keychainProp == signProp && signProp == encryptProp) {
1 parent 7173c0d commit 4beccdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/service_compile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu
159159
signProp := boardBuildProperties.ContainsKey("build.keys.sign_key")
160160
encryptProp := boardBuildProperties.ContainsKey("build.keys.encrypt_key")
161161
// we verify that all the properties for the secure boot keys are defined or none of them is defined.
162-
if !(keychainProp == signProp && signProp == encryptProp) {
162+
if keychainProp != signProp || signProp != encryptProp {
163163
return errors.New(i18n.Tr("Firmware encryption/signing requires all the following properties to be defined: %s", "build.keys.keychain, build.keys.sign_key, build.keys.encrypt_key"))
164164
}
165165

0 commit comments

Comments
 (0)