Skip to content

Log the parser we're using at run time #65

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

Merged
merged 1 commit into from
Jan 26, 2016
Merged

Log the parser we're using at run time #65

merged 1 commit into from
Jan 26, 2016

Conversation

wfleming
Copy link
Contributor

Similar to the approach we took for Radon, this is helpful output to
guide users who might need babel toward the info they would need.

cc @codeclimate/review

Similar to the approach we took for Radon, this is helpful output to
guide users who might need babel toward the info they would need.
@@ -16,6 +16,8 @@ var cli = new CLIEngine(options);
var debug = false;
var checks = require("../lib/checks");

console.error("ESLint is running with the " + cli.getConfigForFile(null).parser + " parser.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already set console.log to console.error to achieve the right semantics re output streams automatically, I'd probably use console.log for our own logging too, to be consistent. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use console.error elsewhere in the script for our own logging, so I actually think sticking with .error is more consistent. The console.log change was made mainly (IMHO) to prevent code deep in the innards of ESLint or plugins from ruining our day. For our own code, we've mostly used .error so far, and personally I think we should continue to because it's more explicit. If we were going to switch to .log, though, I'd say that should be a separate refactor PR, so I'd still argue to keep this commit as-is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Makes sense given the current state of the code not visible in the diff.

@pbrisbin
Copy link
Contributor

LGTM

wfleming added a commit that referenced this pull request Jan 26, 2016
Log the parser we're using at run time
@wfleming wfleming merged commit 67a5bca into master Jan 26, 2016
@wfleming wfleming deleted the will/log-parser branch January 26, 2016 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants