-
Notifications
You must be signed in to change notification settings - Fork 15
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
[CY-6271] Support .cjs extension #65
Comments
Internal ticket created : CY-6271 |
Ping @franciscodua since this seems very similar to #61. Thanks! |
Hi there, Thanks for reaching out! You can use the file extensions feature to configure the accepted extensions for Javascript language. Let me know if this helps. Stefan |
Thanks @stefanvacareanu7. TLDR: PMD breaks with Details... The project I was working on is now live, so for context:
The tooltip on the web UI states that only Without adding the extension, the log for the latest commit analysis shows the following error: If I add
Since PMD is failing, I disabled this tool and all tests now pass as expected. I can live without PMD, but it would be nice if this tool worked as well since I'm using it to analyze other repos. Also, while I'm happy to find a workaround for analyzing |
Hello, We already bumped PMD to the latest stable version and we tested already .cjs files with success. Feel free to make more tests and let us know. Kind regards, |
Similar to #61.
I recently ran into an issue using Codacy Coverage Reporter GitHub Action where codacy-coverage-reporter was failing with a "Can't guess the report language" error. I use Codacy on several projects and had not experienced this before. Here are the relevant parts of the log:
I eventually realized that the difference between this project and previous projects is the use of
.cjs
instead of.js
as the file extension for my source files. This was done to differentiate between CommonJS modules (.cjs
), ES modules (.mjs
), and standard Javascript files (.js
). I was able to resolve the coverage reporter issue by forcing the language to "Javascript":This allowed codacy-coverage-reporter to complete without error, but none of the
.cjs
files were processed by Codacy despite the coverage report containing information for them.Looking at the source linked in the docs, it appears that at least part of the issue is the missing
.cjs
association inLanguage.scala
:https://github.com/codacy/codacy-plugins-api/blob/master/src/main/scala/com/codacy/plugins/api/languages/Language.scala#L102
Hopefully a small update there can resolve the issue, but I know it's rarely that easy. :)
The text was updated successfully, but these errors were encountered: