Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TCE-766] ERROR CodacyPlugins:11 and ERROR c.c.a.c.a.CodacyPluginsAnalyser:31 #122

Open
junw-33455432 opened this issue Jan 16, 2024 · 1 comment

Comments

@junw-33455432
Copy link

When codacy-analysis-cli-action triggered, I got following errors,

Status: Downloaded newer image for codacy/codacy-analysis-cli:7.9.1
01/16 00:08:27 ERROR CodacyPlugins:11 - Failed to parse output: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN
at [Source: (String)"No specified files"; line: 1, column: 3] - No specified files
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN
at [Source: (String)"No specified files"; line: 1, column: 3]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:703)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2853)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2831)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchToken(ReaderBasedJsonParser.java:2612)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1876)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:757)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4141)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3971)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2276)
at play.api.libs.json.jackson.JacksonJson$.parseJsValue(JacksonJson.scala:255)
at play.api.libs.json.StaticBinding$.parseJsValue(StaticBinding.scala:16)
at play.api.libs.json.Json$.parse(Json.scala:169)
at com.codacy.plugins.parser.ToolOutputParser$.$anonfun$parseDockerOutputLines$4(ToolOutputParser.scala:41)
at scala.util.Try$.apply(Try.scala:213)
at com.codacy.plugins.parser.ToolOutputParser$.$anonfun$parseDockerOutputLines$3(ToolOutputParser.scala:41)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:292)
at scala.collection.immutable.List.foreach(List.scala:431)
at scala.collection.generic.TraversableForwarder.foreach(TraversableForwarder.scala:38)
at scala.collection.generic.TraversableForwarder.foreach$(TraversableForwarder.scala:38)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:47)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:292)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:289)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
at com.codacy.plugins.utils.ScalaVersionSpecific$TraversableOps$.flatMapToList$extension(ScalaVersionSpecific.scala:7)
at com.codacy.plugins.parser.ToolOutputParser$.parseDockerOutputLines(ToolOutputParser.scala:37)
at com.codacy.plugins.runners.BinaryDockerRunner.$anonfun$run$4(BinaryDockerRunner.scala:71)
at scala.util.Success.flatMap(Try.scala:251)
at com.codacy.plugins.runners.BinaryDockerRunner.run(BinaryDockerRunner.scala:69)
at com.codacy.plugins.results.traits.ToolRunner.$anonfun$apply$2(ToolRunner.scala:77)
at com.codacy.plugins.results.traits.CodacyDocker$.$anonfun$usingDockerConfig$2(CodacyDocker.scala:45)
at com.codacy.plugins.utils.FileHelper$.$anonfun$usingNewFile$2(FileHelper.scala:51)
at scala.util.Try$.apply(Try.scala:213)
at com.codacy.plugins.utils.FileHelper$.usingNewFile(FileHelper.scala:45)
at com.codacy.plugins.results.traits.CodacyDocker$.usingConfigPath(CodacyDocker.scala:57)
at com.codacy.plugins.results.traits.CodacyDocker$.$anonfun$usingDockerConfig$1(CodacyDocker.scala:39)
at scala.Option.map(Option.scala:230)
at com.codacy.plugins.results.traits.CodacyDocker$.usingDockerConfig(CodacyDocker.scala:38)
at com.codacy.plugins.results.traits.ToolRunner.$anonfun$apply$1(ToolRunner.scala:76)
at scala.util.Try$.apply(Try.scala:213)
at com.codacy.plugins.results.traits.ToolRunner.apply(ToolRunner.scala:61)
at com.codacy.plugins.results.traits.ToolRunner.run(ToolRunner.scala:49)
at com.codacy.analysis.core.tools.Tool.run(Tool.scala:91)
at com.codacy.analysis.core.analysis.CodacyPluginsAnalyser.analyse(CodacyPluginsAnalyser.scala:25)
at com.codacy.analysis.cli.analysis.AnalyseExecutor.$anonfun$issues$1(AnalyseExecutor.scala:155)
at scala.util.Success.flatMap(Try.scala:251)
at com.codacy.analysis.cli.analysis.AnalyseExecutor.issues(AnalyseExecutor.scala:147)
at com.codacy.analysis.cli.analysis.AnalyseExecutor.$anonfun$run$5(AnalyseExecutor.scala:66)
at scala.collection.parallel.AugmentedIterableIterator.map2combiner(RemainsIterator.scala:116)
at scala.collection.parallel.AugmentedIterableIterator.map2combiner$(RemainsIterator.scala:113)
at scala.collection.parallel.immutable.ParHashSet$ParHashSetIterator.map2combiner(ParHashSet.scala:81)
at scala.collection.parallel.ParIterableLike$Map.leaf(ParIterableLike.scala:1056)
at scala.collection.parallel.Task.$anonfun$tryLeaf$1(Tasks.scala:53)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.control.Breaks$$anon$1.catchBreak(Breaks.scala:67)
at scala.collection.parallel.Task.tryLeaf(Tasks.scala:56)
at scala.collection.parallel.Task.tryLeaf$(Tasks.scala:50)
at scala.collection.parallel.ParIterableLike$Map.tryLeaf(ParIterableLike.scala:1053)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal(Tasks.scala:160)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal$(Tasks.scala:157)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:440)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute(Tasks.scala:150)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute$(Tasks.scala:149)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:440)
at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:389)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
at scala.collection.parallel.ForkJoinTasks$WrappedTask.sync(Tasks.scala:379)
at scala.collection.parallel.ForkJoinTasks$WrappedTask.sync$(Tasks.scala:379)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.sync(Tasks.scala:440)
at scala.collection.parallel.ForkJoinTasks.executeAndWaitResult(Tasks.scala:423)
at scala.collection.parallel.ForkJoinTasks.executeAndWaitResult$(Tasks.scala:416)
at scala.collection.parallel.ForkJoinTaskSupport.executeAndWaitResult(TaskSupport.scala:60)
at scala.collection.parallel.ParIterableLike$ResultMapping.leaf(ParIterableLike.scala:960)
at scala.collection.parallel.Task.$anonfun$tryLeaf$1(Tasks.scala:53)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.control.Breaks$$anon$1.catchBreak(Breaks.scala:67)
at scala.collection.parallel.Task.tryLeaf(Tasks.scala:56)
at scala.collection.parallel.Task.tryLeaf$(Tasks.scala:50)
at scala.collection.parallel.ParIterableLike$ResultMapping.tryLeaf(ParIterableLike.scala:955)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute(Tasks.scala:153)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute$(Tasks.scala:149)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:440)
at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)

and

01/16 00:09:34 ERROR c.c.a.c.a.CodacyPluginsAnalyser:31 - Failed analysis for eslint
java.lang.Throwable:
Docker exited with code 1
stdout:
stderr: ConfigurationNotFoundError: No ESLint configuration found in /src/src/services.
at CascadingConfigArrayFactory._finalizeConfigArray (/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:508:19)
at CascadingConfigArrayFactory.getConfigArrayForFile (/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:299:21)
at FileEnumerator._iterateFilesWithFile (/node_modules/eslint/lib/cli-engine/file-enumerator.js:365:43)
at FileEnumerator._iterateFiles (/node_modules/eslint/lib/cli-engine/file-enumerator.js:346:25)
at FileEnumerator.iterateFiles (/node_modules/eslint/lib/cli-engine/file-enumerator.js:296:59)
at iterateFiles.next ()
at CLIEngine.executeOnFiles (/node_modules/eslint/lib/cli-engine/cli-engine.js:771:48)
at /dist/src/engineImpl.js:33:38
at Generator.next ()
at fulfilled (/dist/src/engineImpl.js:5:58) {
messageTemplate: 'no-config-found',
messageData: { directoryPath: '/src/src/services' }
}

Here is how I use the codacy-analysis-cli-action:

  codacy-analysis-cli:
    name: Codacy Analysis CLI
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@main
      - name: Run Codacy Analysis CLI
        uses: codacy/codacy-analysis-cli-action@master  
        with:
          output: results.sarif
          format: sarif
          # Adjust severity of non-security issues
          gh-code-scanning-compat: true
          # Force 0 exit code to allow SARIF file generation
          # This will handover control about PR rejection to the GitHub side
          max-allowed-issues: 2147483647  
      # Upload the SARIF file generated in the previous step  
      - name: Upload SARIF results file
        uses: github/codeql-action/upload-sarif@main
        with:
          sarif_file: results.sarif
@github-actions github-actions bot changed the title ERROR CodacyPlugins:11 and ERROR c.c.a.c.a.CodacyPluginsAnalyser:31 [TCE-766] ERROR CodacyPlugins:11 and ERROR c.c.a.c.a.CodacyPluginsAnalyser:31 Jan 16, 2024
Copy link

Internal ticket created : TCE-766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant