xojs/xo

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Show error if run on a single file that's ignored #238

OmgImAlexis posted onGitHub

When using xo on a single file no errors are shown if said file is ignored in xo's settings.

āžœ  agenda git:(master) DEBUG=xo xo test/fixtures/addTests.js 
  xo Using local install of XO. +0ms
āžœ  agenda git:(master) mv test/fixtures/addTests.js .
āžœ  agenda git:(master) āœ— DEBUG=xo xo ./addTests.js            
  xo Using local install of XO. +0ms

  addTests.js:1:1
  āœ–   1:1   Filename is not in kebab case. Rename it to add-tests.js.     unicorn/filename-case
  āœ–   2:3   Strings must use singlequote.                                 quotes
  āœ–   2:3   Extra space after key none.                                   key-spacing

Makes sense. Wanna try doing a pull request?

posted by sindresorhus over 7 years ago

On a single file, or all files that is directly called (i.e. not globbed) using the CLI?

posted by kevva over 7 years ago

I would open a PR but I have no clue where to put this type of check.

posted by OmgImAlexis over 7 years ago

@kevva We could do it for all specified non-glob inputs. The only way to really detect whether something is a glob or a direct file reference is to fs.existsSync().

posted by sindresorhus over 7 years ago

@issuehuntfest has funded $30.00 to this issue. See it on IssueHunt

posted by IssueHuntBot about 6 years ago

@norris1z has submitted a pull request. See it on IssueHunt

posted by IssueHuntBot about 6 years ago

We only need to test that pattern is a file and check if it's ignored.

This should be very easy to fix now, because I've marked ignored file in report https://github.com/xojs/xo/blob/5ff95ad92cdbd7c36b055b9b9798c87c74d7ca43/lib/report.js#L81

posted by fisker over 3 years ago

Fund this Issue

$30.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

norris1z submitted an output to  xojs/ xo# 238
about 6 years ago
issuehuntfest funded 30.00 for xojs/xo# 238
about 6 years ago