This repository was archived by the owner on Apr 10, 2018. It is now read-only.
Add support for stdin analysis#66
Merged
9 commits merged intomasterfrom Jul 1, 2017
unknown repository
Merged
Conversation
xferra
reviewed
May 28, 2017
src/cli/Strategy/AnalyzeStrategy.cs
Outdated
| var linterFactory = locator.Get<ILinterFactory>(); | ||
| var linters = MergeLinters(context.Linters, config.Engines); | ||
|
|
||
| bool useStdin = (context.Directory ?? context.File) == null ? |
Member
There was a problem hiding this comment.
You can use Console.IsInputRedirected this property for that.
xferra
reviewed
May 28, 2017
src/cli/Strategy/AnalyzeStrategy.cs
Outdated
| } | ||
| tempFile = Path.GetTempFileName(); | ||
| File.WriteAllLines(tempFile, buffer); | ||
| context.File = Path.GetFileName(tempFile); |
Member
There was a problem hiding this comment.
We need a workaround for linters that supports stdin analysis.
xferra
reviewed
May 28, 2017
src/cli/Strategy/AnalyzeStrategy.cs
Outdated
| tempFile = Path.GetTempFileName(); | ||
| File.WriteAllLines(tempFile, buffer); | ||
| context.File = Path.GetFileName(tempFile); | ||
| context.Project = Path.GetDirectoryName(tempFile); |
Member
There was a problem hiding this comment.
I think we need to copy linter config file (if any) to this temp directory.
xferra
suggested changes
May 28, 2017
Member
xferra
left a comment
There was a problem hiding this comment.
Please look at the suggestions above.
Member
|
@binore Please resolve conflicts and remove unnecessary changes. |
added 9 commits
June 29, 2017 15:57
Closes #69
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #52