Coder Social home page Coder Social logo

Comments (5)

github-actions avatar github-actions commented on September 25, 2024

Internal ticket created : CY-6271

from codacy-plugins-api.

jhildenbiddle avatar jhildenbiddle commented on September 25, 2024

Ping @franciscodua since this seems very similar to #61. Thanks!

from codacy-plugins-api.

stefanvacareanu7 avatar stefanvacareanu7 commented on September 25, 2024

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

from codacy-plugins-api.

jhildenbiddle avatar jhildenbiddle commented on September 25, 2024

Thanks @stefanvacareanu7.

TLDR: PMD breaks with .cjs files.

Details...

The project I was working on is now live, so for context:

The tooltip on the web UI states that only .js, .jsx, .jsm, .vue, and .mjs are supported:

CleanShot 2022-08-17 at 11 38 44@2x

Without adding the extension, the log for the latest commit analysis shows the following error:

CleanShot 2022-08-17 at 11 46 07@2x

If I add .cjs to the file extensions section as instructed, the logs show a different error:

CleanShot 2022-08-17 at 11 42 07@2x

Error on file src/index.cjs:1. Cause: PMDException: Error while parsing /src/src/index.cjs
Error on file src/util.cjs:1. Cause: PMDException: Error while parsing /src/src/util.cjs
Error on file tests/index.test.js:1. Cause: PMDException: Error while processing /src/tests/index.test.js

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 .cjs files with Codacy, both .mjs and .cjs are widely-used extensions within the Node ecosystem so supporting one by default without the other feels like a miss. Just my $0.02.

from codacy-plugins-api.

DMarinhoCodacy avatar DMarinhoCodacy commented on September 25, 2024

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,
David Marinho

from codacy-plugins-api.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.