Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Eaton-Vance-Corp/codacy-analysis-cli-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

GitHub Action for Codacy Analysis CLI

This is a GitHub Action for invoking the Codacy Analysis CLI and returning identified issues in the code.

GitHub Action

The following is an example GitHub Action workflow that uses the Codacy Analysis CLI to analyze each commit and pull request.

name: codacy-analysis-cli

on: ["push"]

jobs:
  codacy-analysis-cli:
    runs-on: ubuntu-latest
    name: Codacy Analysis CLI
    steps:
      - name: Checkout code
        uses: actions/checkout@master
      - name: Run codacy-analysis-cli
        uses: codacy/codacy-analysis-cli-action@master

Running the action with the default configurations will:

  • Analyze the current commit or pull request by running all supported static code analysis tools, with their default configurations, for the languages you are using.
  • Print analysis results on the console, visible on the GitHub Action's workflow panel.
  • Fail the workflow if at least one issue is found in your code.

Read the next section to learn how you can further configure this action.

Caveats

This action supports all Codacy Analysis CLI configuration options, with the following exceptions:

  • --commit-uuid -- Not supported. The action will always analyze the commit that triggered it.
  • --api-token, --username, and --project -- Not supported. Use --project-token instead.

The command validate-configuration is also not supported.

When using --project-token make sure that you use GitHub security features to avoid committing the secret token to your repository. For example, if you store your Codacy project token in GitHub, this is how you would use it in the action workflow:

# ...
uses: codacy/codacy-analysis-cli-action@master
with:
    project-token: ${{ secrets.<PROJECT_TOKEN_NAME> }}
# ...

Contributing

We love contributions, feedback, and bug reports. If you run into issues while running this action, open an issue in this repository.

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.

About

GitHub Action for the codacy-analysis-cli

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors