Giter VIP home page Giter VIP logo

codiga / vscode-plugin Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 5.0 10.19 MB

VS Code plugin that suggests code blocks as you type and check for errors. Works for JavaScript, TypeScript, Python, Java, Scala, Ruby, PHP, Apex, Docker

Home Page: https://www.codiga.io/get-codiga/vscode/

License: MIT License

TypeScript 99.66% JavaScript 0.27% Python 0.01% Shell 0.06%
coding-assistant vscode-extension vscode javascript typescript snippets-manager

vscode-plugin's Introduction

Datadog acquired Codiga. This repository is no longer active.

Slack Twitter Visual Studio Marketplace Rating

Codiga: Static Code Analysis on Steroids ๐Ÿš€

  • Works for Python, JavaScript and TypeScript (C# and Java coming)
  • Fix security vulnerabilities and coding mistakes from your IDE
  • Let you write your own custom rules (tutorial or documentation)

Check Python Naming

Getting Started ๐Ÿƒโ€โ™€๏ธ

Automatic ๐Ÿ™Œ

Run the following command at the root of your project.

npx @codiga/cli@latest ruleset-add

It will create a codiga.yml file at the root of your project, which is used to know what rulesets to use. You can refine the rulesets later and rulesets you find on the Codiga Hub.

Manually ๐ŸŒ

  1. Add your API key (see below)
  2. Visit the Codiga Hub and select the rulesets to use for your project.
  3. Create a codiga.yml at the root of your project with the list of rulesets you want to use. An example of a codiga.yml file for Python is shown below.
rulesets:
  - python-security
  - python-best-practices

API keys

To use Codiga, you need an API Token from Codiga. Log on Codiga using your GitHub, GitLab, Bitbucket or Google account.

Then, in your preferences, generate a new API key as shown below.

Generate API Token on Codiga

Add the token in your VS Code preferences.

Enter your API keys

Sending feedback

You can either fill a bug report directly. If you do not want to open a ticket, you can also directly contact us.

Learn More

vscode-plugin's People

Contributors

dastrong-codiga avatar dependabot[bot] avatar gioyik avatar imabp avatar jmromeroeci avatar juli1 avatar khalidatcodiga avatar picimako avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

vscode-plugin's Issues

Add AST types

Is your feature request related to a problem? Please describe.

This plugin doesn't support all AST types associated with Codiga Custom Rules.

Describe the solution you'd like

Please add the following AST type to the ElementChecked -> Rosie mapper.

From Graphql : For Rosie
VariableDeclaration : variabledeclaration
Any : any

You can use this staging ruleset to test the new AST types:

Describe alternatives you've considered
n/a

Additional context
n/a

Support ignore section of the codiga.yml file

Is your feature request related to a problem? Please describe.

Some rules should be ignored, either for the entire project or specific path.

Describe the solution you'd like
Make sure that the ignore section of the codiga.yml file is correctly used and violations being filtered according to the file specification.

Additional context
Please see the documentation of the codiga.yml syntax here.

fix: esbuild breaking dependency

Describe the bug
Installation of repo locally not possible, as [email protected] fails on installation script.
Due to a latest bug mentioned by the esbuild maintainer here: evanw/esbuild#1711 (comment) 21 days ago .

We need to upgrade the dependency, esbuild to 0.14.17

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo freshly (important)
  2. Run npm i
  3. Following error shows up.
npm ERR! code 1
npm ERR! path /xxx/xxx/node_modules/esbuild
npm ERR! command failed
npm ERR! command sh -c node install.js

Screenshots

  • OS: UBUNTU 20.04

image

Expected Behavior
No errors.

Implement violation ignore

Add a menu item where the user can ignore a violation for a project or file

  • When the project is not associated and the option selected, it just shows an information that the user needs to associate a project
  • When the project is associated, it ignores the violation

Avoid duplicate fixes

Describe the bug
Sometimes, a fix for an issue reported by Rosie is shown twice. See picture. We should remove this duplication and ensure a fix only appear once.

To Reproduce

Get a problem with Rosie. Edit the file and sometimes, the fixes are duplicated.

  1. Use ruleset jsx-a11y

  2. File content

  return (
    <div>
      <img src="#" />
      <img alt src="#" />
    </div>
  );
}

  1. Add const foo = "bar"; before the return

Expected behavior
Do not have duplicated.

Screenshots

Screenshot 2023-01-01 at 4 41 48 PM

Duplicated errors

Describe the bug

We are seeing duplicated entries being shown in Code Inspector.

To Reproduce
Steps to reproduce the behavior:

  1. Edit a file
  2. Save
  3. Some issues are reported twice

Expected behavior

One issue with one description should only appear once.

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.