diff --git a/action.yml b/action.yml index aa916fd..eed6ebc 100644 --- a/action.yml +++ b/action.yml @@ -90,6 +90,13 @@ inputs: executions on multiple os of this action. required: false default: 'true' + extraOptions: + description: >- + String of additional command line options to pass to the pmd execution. + For instance, as there is no native interface to use-version, this + option could be set to `--use-version=java-21`. + required: false + default: '' outputs: violations: description: Number of violations found diff --git a/src/util.ts b/src/util.ts index 33656bc..993f16c 100644 --- a/src/util.ts +++ b/src/util.ts @@ -101,6 +101,8 @@ async function executePmd( pmdExecutable += ' check --no-progress' } + pmdExecutable += ' ' + core.getInput('extraOptions', { required: false }) + let sourceParameter: string[] if (Array.isArray(fileListOrSourcePath)) { await writeFileList(fileListOrSourcePath) diff --git a/tsconfig.json b/tsconfig.json index 2f26aac..e18e434 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "module": "NodeNext", "rootDir": "./src", "moduleResolution": "NodeNext", - "baseUrl": "./", + "paths": {"*": ["./*"]}, "sourceMap": true, "outDir": "./dist", "noImplicitAny": true,