Skip to content
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
unknown repository
Jul 1, 2017
Merged

Add support for stdin analysis#66
9 commits merged intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented May 20, 2017

Closes #52

var linterFactory = locator.Get<ILinterFactory>();
var linters = MergeLinters(context.Linters, config.Engines);

bool useStdin = (context.Directory ?? context.File) == null ?
Copy link
Member

@xferra xferra May 28, 2017

Choose a reason for hiding this comment

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

You can use Console.IsInputRedirected this property for that.

}
tempFile = Path.GetTempFileName();
File.WriteAllLines(tempFile, buffer);
context.File = Path.GetFileName(tempFile);
Copy link
Member

Choose a reason for hiding this comment

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

We need a workaround for linters that supports stdin analysis.

tempFile = Path.GetTempFileName();
File.WriteAllLines(tempFile, buffer);
context.File = Path.GetFileName(tempFile);
context.Project = Path.GetDirectoryName(tempFile);
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to copy linter config file (if any) to this temp directory.

@xferra xferra self-assigned this May 28, 2017
Copy link
Member

@xferra xferra left a comment

Choose a reason for hiding this comment

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

Please look at the suggestions above.

@xferra
Copy link
Member

xferra commented Jun 29, 2017

@binore Please resolve conflicts and remove unnecessary changes.

@ghost ghost merged commit ef88bcd into repometric:master Jul 1, 2017
@ghost ghost deleted the stdin_analyze branch July 1, 2017 10:06
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant