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

Zero questions mode #39

Closed
jayvdb opened this issue Nov 7, 2016 · 6 comments
Closed

Zero questions mode #39

jayvdb opened this issue Nov 7, 2016 · 6 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Nov 7, 2016

It should be possible to run this without any questions being asked.
It should make sensible decisions, and the user can edit the .coafile later when they better understand what the config options all mean.

This will allow https://github.com/coala/coala/wiki/Google-Code-In-Task-Use-coala to be an extremely easy task.

@sils
Copy link
Member

sils commented Nov 7, 2016

uhm this is hard, @adtac is this doable within a week so it works? Doesn't have to be perfect.

@adtac
Copy link
Member

adtac commented Nov 8, 2016

Yeah, for the questions thing - the type is the only data we have about a particular setting (bool, int, string, ...). If we have a set of possible values (like aspects currently do) for each setting, it's pretty easy. So I'm wondering if we should put more resources into completing aspects or do this first.

@jayvdb
Copy link
Member Author

jayvdb commented Nov 8, 2016

In tbis mode, if a bear needs a user answer, dont enable that bear.

@jayvdb
Copy link
Member Author

jayvdb commented Nov 10, 2016

A little analysis shows this is easy, and is effectively:

     relevant_bears = filter_relevant_bears(used_languages)
+    if zeroconf_mode:
+         relevant_bears = [bear for bear in relevant_bears
+                          if not bear.get_non_optional_settings()]
     print_relevant_bears(printer, relevant_bears)

Some arg parsing is also needed.

@jayvdb
Copy link
Member Author

jayvdb commented Nov 17, 2016

I'm not 100% locked into --ci CLI arg, and it is a bit cryptic.
--non-interactive is descriptive and fairly commonly used.
It would be nice if this mode was also available for coala, which would be the same as "reject all questions and do the most logic thing."

It would be easier to use the CI envvar, which exposes tge functionality without needing for pick the CLI arg design.

@whythefyouflying
Copy link

@jayvdb While we have this mode already for coala and it's called --ci, for this one --non-interactive would have more sense in my opinion. You are going to generate a .coafile once, so it has nothing to do with continuous integration.

jayvdb added a commit to jayvdb/coala-quickstart that referenced this issue Nov 19, 2016
Disables all bears that require console interaction before
they can be used.

Fixes coala#39
jayvdb added a commit to jayvdb/coala-quickstart that referenced this issue Nov 25, 2016
jayvdb added a commit to jayvdb/coala-quickstart that referenced this issue Dec 4, 2016
A new command line option --non-interactive may be used to
prevent prompts, using defaults, and generating a .coafile
that is safe to use in non-interactive mode, as it disables
all bears needing values for non-optional settings.

The introduction of a command line parser requires that
the parser is given to coalib.settings functions, otherwise
it would instantiate the default coala command line parser
which has many arguments that are either not appropropriate
or not implemented in coala-quickstart.

Closes coala#39
jayvdb added a commit to jayvdb/coala-quickstart that referenced this issue Dec 5, 2016
A new command line option --non-interactive may be used to
prevent prompts, using defaults, and generating a .coafile
that is safe to use in non-interactive mode, as it disables
all bears needing values for non-optional settings.

The introduction of a command line parser requires that
the parser is given to coalib.settings functions, otherwise
it would instantiate the default coala command line parser
which has many arguments that are either not appropropriate
or not implemented in coala-quickstart.

Closes coala#39
@rultor rultor closed this as completed in #40 Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants