Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bear settings to green mode project #550

Open
jayvdb opened this issue Apr 8, 2018 · 1 comment
Open

Add bear settings to green mode project #550

jayvdb opened this issue Apr 8, 2018 · 1 comment
Assignees

Comments

@jayvdb
Copy link
Member

jayvdb commented Apr 8, 2018

The quickstart green project should also include adding/exposing/standarding bears defaults.

The green mode will go around in circles when it finds different bears have undeclared defaults. We've done a lot of work tackling this problem with the tabs-vs-spaces and max-line-length for each bear, creating explicit settings with a default which shows how the linter works by default.

When these settings are missing, a green mode cant easily see why there are so many failures, and thus cant change a setting to allow the linter to accept the code.

Another type of useful change to bear settings is adding sensible defaults, like coala/coala-bears#2227 . That allows the bear to be enabled more easily, because green mode doesnt need to guess an initial value without any context to know whether it should be a low number or a high number.

Even better is adding setting datatype constraints, where the data type of the setting specifies a valid range. e.g. int has a lot of possible values which green mode would need to try. However the range of suitable values might actually be logarithmic. e.g. a max_line_per_file of 1200003 isnt particularly meaningful. The datatype could be 1..1000, 2000, 3000 etc to 10,000 , then incrementing in 10,000s, and then incrementing in 100,000s etc until it reaches the maximum size of int.
Another problem is we are using 0 for unlimited chars per line. That is non-nonsensical for ML algorithm. It should be the highest possible int instead of 0.

@jayvdb
Copy link
Member Author

jayvdb commented May 13, 2018

Type annotations can be classes which can hold any information quickstart needs to improve its algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants