platform icon indicating copy to clipboard operation
platform copied to clipboard

Can an issue's Location refer to a directory?

Open jwsloan opened this issue 6 years ago • 3 comments

I've started on an Engine for todogroup/repolinter. Repolinter checks for the existence of specific files, content within files, and performs a few other helpful checks against a repo. It should work quite nicely with CodeClimate.

One issue I've run into is the requirement to provide a file path. If a file is missing, I would not have that to provide. It wouldn't make sense to provide a path to a file that does not exist. Instead, it seems reasonable to pass the root directory as the path. Can that be done within the spec?

jwsloan avatar Nov 09 '17 04:11 jwsloan

Apologies for the very late reply here, this got missed & I'm just now going through some old issues among our repositories.

This use case is not currently supported within the spec or by our code. File paths must point at readable normal files checked into the repository.

We have discussed loosening this requirement at times, and allowing references to non-file entities (e.g. https://github.com/codeclimate/spec/issues/45), but have no immediate plans to make any changes.

wfleming avatar Aug 28 '18 14:08 wfleming

To your specific use case of wanting to report an issue on a file that doesn't exist: we've seen that come up before, and I believe the fix (hacky though it is) was to instead report the issue on some other related file that did exist.

wfleming avatar Aug 28 '18 14:08 wfleming

That something that would be very interesting for me too. I'd like to create an engine checking the code based on some of the best practices and as an example add an issue informing about missing Readme file. I know that you were asked about it for example here https://github.com/codeclimate/spec/issues/18 so it seems to be a quite "hot" feature. Is it possible to add this feature to the specification and the engine? :-)

mateuszgorniak avatar Sep 06 '18 13:09 mateuszgorniak