Skip to content
Merged
Prev Previous commit
Next Next commit
Fixed linter warning
commands/service_compile.go:162:5: QF1001: could apply De Morgan's law (staticcheck)
        if !(keychainProp == signProp && signProp == encryptProp) {
  • Loading branch information
cmaglie committed Mar 31, 2025
commit 4beccdf4186705253449dd285d56a2c6bb81a05d
2 changes: 1 addition & 1 deletion commands/service_compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu
signProp := boardBuildProperties.ContainsKey("build.keys.sign_key")
encryptProp := boardBuildProperties.ContainsKey("build.keys.encrypt_key")
// we verify that all the properties for the secure boot keys are defined or none of them is defined.
if !(keychainProp == signProp && signProp == encryptProp) {
if keychainProp != signProp || signProp != encryptProp {
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"))
}

Expand Down