Fix formatting

This commit is contained in:
Paul Schaub 2025-04-10 12:46:50 +02:00
parent 3700c60fde
commit a906028ce7
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 12 additions and 7 deletions

View file

@ -88,7 +88,10 @@ class SopCLI {
// Hide generate-completion command // Hide generate-completion command
subcommands["generate-completion"]?.commandSpec?.usageMessage()?.hidden(true) subcommands["generate-completion"]?.commandSpec?.usageMessage()?.hidden(true)
// render Input/Output sections in help command // render Input/Output sections in help command
subcommands.values.filter { (it.getCommand() as Any) is AbstractSopCmd } // Only for AbstractSopCmd objects subcommands.values
.filter {
(it.getCommand() as Any) is AbstractSopCmd
} // Only for AbstractSopCmd objects
.forEach { (it.getCommand() as AbstractSopCmd).installIORenderer(it) } .forEach { (it.getCommand() as AbstractSopCmd).installIORenderer(it) }
// overwrite executable name // overwrite executable name
commandName = EXECUTABLE_NAME commandName = EXECUTABLE_NAME
@ -96,7 +99,8 @@ class SopCLI {
executionExceptionHandler = SOPExecutionExceptionHandler() executionExceptionHandler = SOPExecutionExceptionHandler()
exitCodeExceptionMapper = SOPExceptionExitCodeMapper() exitCodeExceptionMapper = SOPExceptionExitCodeMapper()
isCaseInsensitiveEnumValuesAllowed = true isCaseInsensitiveEnumValuesAllowed = true
}.execute(*args) }
.execute(*args)
} }
} }

View file

@ -5,13 +5,13 @@
package sop.cli.picocli.commands package sop.cli.picocli.commands
import java.io.IOException import java.io.IOException
import java.util.*
import picocli.CommandLine.Command import picocli.CommandLine.Command
import picocli.CommandLine.Option import picocli.CommandLine.Option
import picocli.CommandLine.Parameters import picocli.CommandLine.Parameters
import sop.cli.picocli.SopCLI import sop.cli.picocli.SopCLI
import sop.exception.SOPGPException import sop.exception.SOPGPException
import sop.util.HexUtil.Companion.bytesToHex import sop.util.HexUtil.Companion.bytesToHex
import java.util.*
@Command( @Command(
name = "validate-userid", name = "validate-userid",

View file

@ -9,9 +9,10 @@ package sop
* *
* @param micAlg string identifying the digest mechanism used to create the signed message. This is * @param micAlg string identifying the digest mechanism used to create the signed message. This is
* useful for setting the `micalg=` parameter for the multipart/signed content-type of a PGP/MIME * useful for setting the `micalg=` parameter for the multipart/signed content-type of a PGP/MIME
* object as described in section 5 of [RFC3156](https://www.rfc-editor.org/rfc/rfc3156#section-5). * object as described in section 5 of
* If more than one signature was generated and different digest mechanisms were used, the value * [RFC3156](https://www.rfc-editor.org/rfc/rfc3156#section-5). If more than one signature was
* of the micalg object is an empty string. * generated and different digest mechanisms were used, the value of the micalg object is an empty
* string.
*/ */
data class SigningResult(val micAlg: MicAlg) { data class SigningResult(val micAlg: MicAlg) {

View file

@ -6,8 +6,8 @@ package sop.operation
import java.io.IOException import java.io.IOException
import java.io.InputStream import java.io.InputStream
import sop.exception.SOPGPException
import java.util.* import java.util.*
import sop.exception.SOPGPException
/** Subcommand to validate UserIDs on certificates. */ /** Subcommand to validate UserIDs on certificates. */
interface ValidateUserId { interface ValidateUserId {