GithubHelp home page GithubHelp logo

coala / coala-bears Goto Github PK

View Code? Open in Web Editor NEW
295.0 15.0 580.0 2.69 MB

Bears for coala

Home Page: https://coala.io/

License: GNU Affero General Public License v3.0

Python 88.85% Shell 0.84% C 2.06% C# 0.02% Go 0.01% Java 0.06% PHP 0.13% Ruby 0.11% JavaScript 0.01% CSS 0.02% C++ 0.02% HTML 0.05% Gherkin 0.46% PowerShell 7.23% Julia 0.01% Perl 0.01% Haml 0.05% Pug 0.02% Stylus 0.05%
python code-analysis linter java c languages generic hacktoberfest

coala-bears's Introduction

https://cloud.githubusercontent.com/assets/7521600/15992701/ef245fd4-30ef-11e6-992d-275c5ca7c3a0.jpg

coala-bears

coala-bears is a Python package containing all the bears that are officially supported by coala. It features more than 78 bears covering 54 languages. Here is a generated list that contains information about each bear, such as the languages it supports and what fixes it can apply to your code.

'Throughput Graph'



Installation

To install the latest stable version, run:

$ pip3 install coala-bears

Stable

To install the latest development version, run:

$ pip3 install coala-bears --pre

The latest code from the master branch is automatically deployed as the development version in PyPI.

To also install all bears for coala at once, run:

$ pip3 install coala-bears

Be sure to use the latest version of pip, the default pip from Debian doesn't support our dependency version number specifiers. You will have to use a virtualenv in this case.

PyPI Windows |Linux|


Languages Supported

To see what coala can do for your language, run:

$ coala --show-bears --filter-by-language Python
Languages coala provides algorithms for
C Latex SQL
C++ Lua Stylus
C# Markdown Swift
CMake Matlab/Octave TypeScript
CoffeeScript Natural Language (English) Verilog
CSS Perl VHDL
Dart PHP Vimscript
Fortran Python 2 XML
Go Python 3 YAML
Haskell R  
HTML reStructured Text  
Java Ruby  
JavaScript Scala  
JSP SCSS  
Julia sh & bash scripts  

The number of bears grows every day! If you want to see any particular functionality be sure to submit an issue, but please read the Getting Involved section before doing so.

You can read more at our documentation. There you can learn how to easily write bears yourself! Be sure to let us know if you do so, so we'll be able to include it here and spread the word about it.


Usage

For more information about how to do basic analysis, check out the coala README.


Getting Involved

If you would like to be a part of the coala community, you can check out our Getting In Touch page or ask us at our active Gitter channel, where we have maintainers from all over the world. We appreciate any help!

We also have a Newcomers' Guide to help you get started by fixing an issue yourself! If you get stuck anywhere or need some help, feel free to contact us on Gitter or drop a mail at our newcomer mailing list.

gitter


Support

Feel free to contact us at our Gitter channel, we'd be happy to help!

If you are interested in commercial support, please contact us on the Gitter channel as well.

You can also drop an email at our mailing list.


Authors

coala is maintained by a growing community. Please take a look at the meta information in setup.py for the current maintainers.


License

AGPL

coala-bears's People

Contributors

abdealiloko avatar abhay-raizada avatar adhikasp avatar adrianzatreanu avatar adtac avatar arafsheikh avatar asnelchristian avatar damngamerz avatar jarifibrahim avatar jayvdb avatar kriti21 avatar kx-chen avatar makman2 avatar meetmangukiya avatar mixih avatar mr-karan avatar newbazz avatar niklasmm avatar nkprince007 avatar refeed avatar saksham189 avatar sangamcse avatar sanketdg avatar satwikkansal avatar sils avatar techievena avatar underyx avatar virresh avatar vivek425ster 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

coala-bears's Issues

Move bears here

all bears should be moved into this repository, ideally todayish

Bear: Check for broken links

From @AbdealiJK on February 10, 2016 16:25

Owing to the numerous broken links we have coala/coala#1383 coala/coala#1350 it would be really awesome if we could make a bear which tests whether a markdown or rst file has any broken links

We could simply use the URL regex which will be able to give us a lost of links. After which we simply test that each link gives a 200 HTTP code ?
We can skip this test if the bear is unable to find google (or some well known site) because they test runner may not have internet connection.

Copied from original issue: coala/coala#1396

DocumentationFormatBear

From @Makman2 on December 16, 2015 23:34

The documentation extraction routines are ready now, what needs to be done next:

  1. documentation parsing machinery:
    This should work with regexes or similar. Also this shall be configured for each language inside a coafile!
  2. documentation reassembling:
    Shouldn't be problematic using the current DocumentationComment class. Just a nice function like assemble_documentation_comment/similar.
  3. The actual DocumentationFormatBear
  • extract documentation from given source code
  • parse it
  • check it against the user defined style/regex
  • for patching: reassemble the wanted documentation comment

See #919.

Copied from original issue: coala/coala#1140

Add rust-clippy bear for rust support

From @sudheesh001 on February 8, 2016 19:19

Rust clippy is one of the linters for rustc the Rust programming language.
https://github.com/Manishearth/rust-clippy#usage

It gives the linter warning in the following format

src/main.rs:8:5: 11:6 warning: you seem to be trying to use match for destructuring a single type. Consider using `if let`, #[warn(single_match)] on by default
src/main.rs:8     match x {
src/main.rs:9         Some(y) => println!("{:?}", y),
src/main.rs:10         _ => ()
src/main.rs:11     }
src/main.rs:8:5: 11:6 help: Try
if let Some(y) = x { println!("{:?}", y) }

Copied from original issue: coala/coala#1324

Make LocalBearTestHelper robust

From @AbdealiJK on December 8, 2015 13:31

Currently, LocalBearTestHelper simply checks if there are results that are yielded or not.
Would be considerably better is we give it a list of line, cols where the result should yield in a given file.

Copied from original issue: coala/coala#1111

GoVetBear - skip condition invalid

From @AbdealiJK on February 9, 2016 3:20

I have ubuntu 14.04 and was trying to get all the tests in coala to work for me.
I noticed that GoVetBearTest kept failing and found out that in GoVet the skip condition is set to go.
This is not right because that isn't the correct thing to check. I had go installed but not go vet.

I had to install golang-go.tools to get the vet package in go.

Copied from original issue: coala/coala#1329

RadonBear throws exceptions

From @sils1297 on February 18, 2016 14:10

[DEBUG][15:10:00] The bear RadonBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.

Traceback information is provided below:

Traceback (most recent call last):
  File "/home/lasse/prog/coala/coalib/bears/Bear.py", line 97, in execute
    return list(self.run_bear_from_section(args, kwargs) or [])
  File "/home/lasse/prog/coala/coalib/misc/../../bears/python/RadonBear.py", line 42, in run
    filename, visitor.lineno, visitor.col_offset, visitor.endline)
  File "/home/lasse/prog/coala/coalib/results/SourceRange.py", line 43, in from_values
    return cls(start, end)
  File "/home/lasse/prog/coala/coalib/misc/Decorators.py", line 298, in decorated
    return function(*args, **kwargs)
  File "/home/lasse/prog/coala/coalib/results/SourceRange.py", line 25, in __init__
    TextRange.__init__(self, start, end)
  File "/home/lasse/prog/coala/coalib/misc/Decorators.py", line 298, in decorated
    return function(*args, **kwargs)
  File "/home/lasse/prog/coala/coalib/results/TextRange.py", line 33, in __init__
    raise ValueError("End position can't be less than start position.")
ValueError: End position can't be less than start position.

Copied from original issue: coala/coala#1578

Cleanup GoReturnsBearTest by removing unnecessary information

From @sudheesh001 on February 15, 2016 19:48

the GoReturnsBearTest contains the following which needs to be removed

a = ['import "errors"', '',
     'func F() (*MyType, int, error) { return nil, 0, errors.New("foo") }']
b = ['package main', '', 'import "os"', '',
     'func main() {', '\tf, _ := os.Open("foo")', '}']

Put the good_files in the same line like the bad_files

(good_file1,
     good_file2,),
    (bad_file1, bad_file2,))

Also correct GoReturnsBear's run() documentation to show using goreturns instead of using gofmt

difficulty/newcomer

Copied from original issue: coala/coala#1516

indentation bear

From @sils1297 on February 5, 2015 16:43

shouldn't be that complex, usually you only have to look at brackets (and strings and commits because you should ignore brackets there.) and colons or so. I think we can do a pretty generic algorithm for that.

Copied from original issue: coala/coala#225

RadonBear throws exceptions

From @sils1297 on February 18, 2016 14:10

[DEBUG][15:10:00] The bear RadonBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.

Traceback information is provided below:

Traceback (most recent call last):
  File "/home/lasse/prog/coala/coalib/bears/Bear.py", line 97, in execute
    return list(self.run_bear_from_section(args, kwargs) or [])
  File "/home/lasse/prog/coala/coalib/misc/../../bears/python/RadonBear.py", line 42, in run
    filename, visitor.lineno, visitor.col_offset, visitor.endline)
  File "/home/lasse/prog/coala/coalib/results/SourceRange.py", line 43, in from_values
    return cls(start, end)
  File "/home/lasse/prog/coala/coalib/misc/Decorators.py", line 298, in decorated
    return function(*args, **kwargs)
  File "/home/lasse/prog/coala/coalib/results/SourceRange.py", line 25, in __init__
    TextRange.__init__(self, start, end)
  File "/home/lasse/prog/coala/coalib/misc/Decorators.py", line 298, in decorated
    return function(*args, **kwargs)
  File "/home/lasse/prog/coala/coalib/results/TextRange.py", line 33, in __init__
    raise ValueError("End position can't be less than start position.")
ValueError: End position can't be less than start position.

Copied from original issue: coala/coala#1578

annotation bear

From @sils1297 on November 13, 2015 13:28

a bear that takes the language definition and annotates each line with simple properties like "from here to there is a comment", "from here to there is a string" and so on. This is intended to be used by other bears for simpler analysis functionality

Copied from original issue: coala/coala#1040

JSONFormatBear: Parse exception message

From @sils1297 on December 13, 2015 13:31

Would be a nice feature to show line and column automatically, instead of having it in the message:

This file does not contain parsable JSON. 'Expecting property name enclosed in double quotes: line 2 column 7 (char 8)'

Copied from original issue: coala/coala#1130

PyLintBear: Use checker/rule as origin

From @sils1297 on February 11, 2016 13:19

this way the user can even ignore one pylint rule individually.

If a newcomer wants to do this please ask us, this description isn't the best one... or just look in Lint.py and CheckstyleBear.py which actually does this.

Copied from original issue: coala/coala#1408

Add issue labels

We at least want the difficulty labels and some others to categorize issues in this repository. @AbdealiJK can you do that?

setup.py downloads possibly evil file via unsecured connection

From @sils1297 on February 11, 2016 13:40

I got this comment on my blog recently:

Interesting project! Just one minor issue: Why has setup.py code in it to download a jar file? What is supposed to be in the file? If it is free software, why not use its source code and compile it? Why download it over unsecured HTTP? Is the content not relevant? Thanks!

And I think we should think about that. We're downloading checkstyle.jar there which shouldn't be evil. Compiling it from source though sounds like to be avoided IMO.

Copied from original issue: coala/coala#1410

feature: Make PyLintBear global

From @sils1297 on July 6, 2015 12:44

Shouldn't be that hard actually, add {file} to the msg pattern and parse it. Attention: that msg pattern may contain any signs dependent on the platform, so we probably want some multi-char delimiter like PYLINT_PATH_DELIM for seperating it from the rest, anyone using a PYLINT_PATH_DELIM in his path is hereby declared stupid and coala-hostile :)

Copied from original issue: coala/coala#735

InferBear

From @sils1297 on February 9, 2016 23:23

http://fbinfer.com/ - works on Objective-C, Java, or C code and seems to do quite some cool stuff. I'm not sure where we want to put it as it doesn't really belong in one of the language folders, maybe in the c_languages...

This is a simple wrapper if infer is done properly it should be simple to do.

Copied from original issue: coala/coala#1364

checkstyle.jar: Download it as requirement-install-step

From @Makman2 on February 13, 2016 22:33

I would propose for a clean requirement-install-handling to populate ./setup.py with two new commands, e.g. install-test-requirements and install-requirements. These two commands shall do the pip install via pip3 install -r requirements.txt (or test-requirements.txt) and also allows to handle custom install steps like the checkstyle.jar download.

This also needs adaption inside the docs and CI-scripts!

Copied from original issue: coala/coala#1465

Add circleci, codecov and rultor

Add circleci, rultor and codecov

  • Circleci needs to be enabled on their website
  • Codecov needs to be enabled (maybe also ass a secret token on circleci?)
  • Add pypi pushing in rultor - Needs that secret key thing to be done

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.