Coder Social home page Coder Social logo

coala / coala Goto Github PK

View Code? Open in Web Editor NEW
3.5K 99.0 1.3K 13.4 MB

coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

Home Page: https://coala.io/

License: GNU Affero General Public License v3.0

Python 94.74% Shell 0.13% C 0.01% Batchfile 0.21% PowerShell 4.92%
python code-analysis linux windows macos lint hacktoberfest

coala's Introduction

image


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." โ€• John F. Woods


Linux Build Status Windows Build status macOS Build Status codecov.io Documentation Status AGPL OpenHub


coala provides a unified interface for linting and fixing code with a single configuration file, regardless of the programming languages used. You can use coala from within your favorite editor, integrate it with your CI, get the results as JSON, or customize it to your needs with its flexible configuration syntax.

coala supports popular programming languages including Python, C/C++, Java, JavaScript, CSS, and several others out of the box.

Install coala | Get Involved | Chat | Roadmap | Blog | Twitter

coala's People

Contributors

abdealiloko avatar abhay-raizada avatar adhikasp avatar adrianzatreanu avatar adtac avatar alphadose avatar asnelchristian avatar damngamerz avatar fneu avatar jayvdb avatar li-boxuan avatar makman2 avatar mixih avatar nosferatul avatar palash25 avatar pareksha avatar raivaibhav avatar redridge avatar sanketdg avatar satwikkansal avatar shreyans800755 avatar sils avatar sudheesh001 avatar tushar-rishav avatar udayan12167 avatar underyx avatar uran198 avatar userzimmermann avatar wjcode avatar yash-nisar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coala's Issues

VoiceOutputter should fail but not silently

Current behavior:
On a system that does not provide espeak, VoiceOutputter can be succesfully initialized to then fail on every call of .print(). An error message is printed in these cases to inform the user about the problem and offer an solution (install espeak).


Expected behavior:
VoiceOutputter should not be able to initialize on a system on which it cannot be used. This way, the best possible alternative Outputter can be selected by coala or the user to maintain most of the functionality of the program. Furthermore, considering the target audience of a voice outputter, it might be a good idea to play a prerecorded audio message along with the error message to address users that rely on audible feedback.

BearCollector collects all bears by default

This is not a good thing IMO. We should have some default directories for bears and if the user doesnt specify any bears he doesnt want any. A good behaviour would be IMO:

  • An empty coafile doesn't do anything
  • A coafile as simple as
bears = SpacingBear
files = *.c

should suffice fo check all c files (recursive) with the SpacingBear. With our current settings spec this is not possible.

Use OutputFormatter and Loggers for everything output-relevant

The usual print shouldn't be used anywhere outside the colorPrinter. The ColorPrinter shall only be used by the outputFormatter. Use the output formatter for more abstract formatting e.g. output_file_results which does everything output related on its own.

This way we can easily write an OutputFormatter for HTML output so we can generate a complete project analysis in HTML similar to sonar or doxygen.

Provide Language-dependent things as settings

These are:

  • Line continuators (in string/in code [latter may be empty e.g. in C])
  • One-line comment begin indicators
  • String delimiters
  • more to follow . . .

this should help the filters a lot.

untranslate exceptions

  • No exception message should be marked for translation. This is for programmers only.
  • LogPrinter shouldnt offer log_exception at least not in this manner. I can think about log_exception plus an extra message which logs the message and puts the exception message below explaining that this is for debugging use and may be sent to the devs or so.
    • Auto bugfiling? Sending mail? Anything like this?

windows support

would be nice to have coala running on windows as well, this would probably need some work with

  • tests
  • installation

Fillib should provide some more useful functions

Ideas are:

  • determine if something is between string delimiters or not
  • get indentation of this line
    • as string, should return just a substring containing all non-printable characters until the first printable one. So this may contain tabs and spaces
    • get indentation as integer; the function should itself retrieve the necessary tab size from settings

Please edit for adding more ideas or comment and I'll do it.

allow executing tests without coverage

saves performance. If you're not writing tests you probably want to hide the coverage explicitly. This might be relevant especially if our test suite grows.

coala should recognize symlinks

All parts of coala and especially the collectors should be aware of symlinks and shoule i.e. not open a symlinked directory if it was specified as ignored directory.

Filternames are messy

Because it is impractical to use the class name of a filter as it's filter_name for the filter import, the file name is being used.

To keep a certain consistency for filter identification throughout the program, only the one class should be imported from a filter file, that matches the file basename in a case sensitive way.

As a result, file and class name can be used for identification at any time without naming inconsistencies.

Settings backup file

When saving settings there should be a backup file!

Reasons:

  1. Something could go wrong when saving (shouldnt occur)
  2. Some user comments may be deleted. They may be long...

Backup file should be originalfilename~ or so. I like the ~ postfix, @smfn3321 what do you think?

Could we even save all versions somehow? (May be overkill...)

cache checked files

Auto-cache:

  • caches which file is checked by which filter
    • attention: how is this affected by version control systems?
      Filter cache:
  • via fillib

way to probe bears for needed settings

we currently have get_needed_settings but it would be nice to have something like get_minimal_needed_settings() and get_needed_settings() on top of it. This way the user can find out what settings are possible for this bear and not only which ones are needed.

What do you think?

Create a Logo

We need an Icon :) this should be preferably available as ASCII art and shown in the -h menu. For HTML output we should also provide a png or so.

Any ideas?

Provide outside API

I think it would be good to provide an API for other programs to use the CodeC. Lets say you write an IDE, you may want to use Codec for auto code-adjustment. Running codec with exec() or so is ugly so we should provide an API to the outside.

@smfn3321 is a C/C++ wrapper difficult?

Settings: Unbound comments are not saved

When having a comment at the end of a settings file it is deleted by -s because there's no command associated with it.

This is important since user looses data.

Update LineParser

  • accept section1.key1,section2.key2=value
    (- change return value to something fitting this case)
  • maybe make it a parser
  • maybe implement escape values

Copyrights and license

We need license and copyright headers above every file.

There should be a filter checking if every first line(s) match with a regex representing the license line.

Whats this all about these author assignments?

Implement SettingsManager

Blocked by #89 .

The SettingsManager will be an object that has great defaults and its whole purpose is to be invoked and everything related to settings happens. This includes:

  • Reading default settings
  • Reading settings from CLI
  • Reading settings from coafile
  • Fill settings
  • If needed save settings to coafile
  • Return the settings and the filters (since we need to collect them for filling up settings anyway)

Anyone against this?

do the 0.1 release!

Sooner or probably rather later we need a release procedure. This includes:

  • Creating a tarball and other distributable things
  • Testing the release on linux, BSD, windows with translations

We probably need to work on the setup.py in order to make this possible, thats why I'm stating this so early. Anything else I forgot?

documentation

Hi everyone,

we need three kinds of documentation

  • man-pages/user documentation/external bear documentation: for users of coala
  • API documentation: for users of the coalib API, including coala developers, bear writers and IDE writers
  • bear API documentation: for bear writers, should include tutorials

Most of this documentation should be handwritten and we'll want to have a website for that. We have the coala-website repository for developing a web presence for coala. (https://github.com/sils1297/coala-website)

This bug is here to collect ideas on how to manage translatable, handwritten documentation in all these areas. We probably want some markup language so we can generate HTML pages out of it.

BearCollector only has flat bear_dirs.

We need flat and recursive bear_dirs!

@smfn3321 thats your thing to do.

Furthermore I need a classmethod from_section that sets the constructor parameters by itself.

pypy3 support

Currently some tests fail when running them with pypy3. (Note that in order to test this you need to adjust the python call in the TestHelper so it calls pypy3 instead of python3.)

Though pypy3 is a valid python implementation we should support it.

Make unittests possible without ez_setup

These egg things break our code and I dont like having some weird library in our program where we dont really know what its doing.

So let's remove the ez_setup.py and invoke our unittests somehow else.

This blocks #5 .

Implement Results

We'll need some result types:

  • AnnotationResult
  • LineResult (associated to a specific line, allows a replacement)

Implement Outputter

#90 blocks this.

The Outputter shall be able to:

  • Order the results
  • Check if the line of the result contains a "nocheck" or "nocheck: analyzer_name" which matches origin of the result, if thats the case dont use it!
  • Output the result (this'll happen in the derivatives so we'll only need the API)

website

It would be nice to have a website.

Following features should be covered:

  • Present an overview over what coala is
  • Some tutorials on how to use coala and how to write bears

On long term it would be nice to add the following features:

  • Add some place to share bears, similar to agora.octave.org
  • Add a wiki
  • Add a mailing list
  • Interactive demo ?

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.