Coder Social home page Coder Social logo

codacy-plugins-api's Introduction

codacy-plugins-api

Codacy Badge Codacy Badge CircleCI Maven Central

A dependency free api for codacy-engines

This repository is meant to be the interface between

It's held dependency free so we are flexible on changing (versions of) mainly json-libraries on the components that use it.

What is Codacy

Codacy is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.

Among Codacy’s features

  • Identify new Static Analysis issues
  • Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)
  • Auto-comments on Commits and Pull Requests
  • Integrations with Slack, HipChat, Jira, YouTrack
  • Track issues in Code Style, Security, Error Proneness, Performance, Unused Code and other categories

Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.

Codacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.

Free for Open Source

Codacy is free for Open Source projects.

codacy-plugins-api's People

Contributors

afsmeira avatar bmbferreira avatar brinxmat avatar codacy-vrhpires avatar goncalo-codacy avatar heliocodacy avatar jllopes avatar josemiguelmelo avatar ljmf00 avatar lolgab avatar machadoit avatar mrfyda avatar pedrocodacy avatar pedrorijo91 avatar prendi avatar rtfpessoa avatar stefanvacareanu7 avatar veelenga avatar xplosunn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codacy-plugins-api's Issues

[CY-6271] Support .cjs extension

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:

2022-06-25 06:19:38.548Z  info [ConfigurationRules] API base URL: https://api.codacy.com/  - (ConfigurationRules.scala:79)
[32](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:33)
2022-06-25 06:19:38.663Z  info [CommitUUIDProvider] CI/CD provider GitHub Actions found Commit UUID c215d24a954cb2e7a657606c910a1598e4697b1f  - (CommitUUIDProvider.scala:132)
[33](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:34)
2022-06-25 06:19:38.663Z  info [ReportRules] Parsing coverage data from: /home/runner/work/mergedeep/mergedeep/coverage/lcov.info ...  - (ReportRules.scala:37)
[34](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:35)
2022-06-25 06:19:38.668Z  info [ReportRules] Coverage parser used is com.codacy.parsers.implementation.LCOVParser$@51e6bdbd  - (ReportRules.scala:42)
[35](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:36)
2022-06-25 06:19:38.669Z  info [ReportRules] Generated coverage report: /tmp/codacy-coverage-11970218897261936170.json (1.53 kB)  - (ReportRules.scala:255)
[36](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:37)
2022-06-25 06:19:38.669Z  info [ReportRules] Uploading coverage data...  - (ReportRules.scala:256)
[37](https://github.com/jhildenbiddle/mergedeep/runs/7052111013?check_suite_focus=true#step:6:38)
2022-06-25 06:19:38.669Z error [CodacyCoverageReporter] Can't guess the report language  - (CodacyCoverageReporter.scala:25)

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":

- name: Report code coverage
  uses: codacy/[email protected]
  with:
    project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
    coverage-reports: coverage/lcov.info
    language: 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 in Language.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. :)

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.