Skip to content
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

feat: Chunked execution of linters on Windows only #439

Merged
merged 3 commits into from May 7, 2018

Conversation

sudo-suhas
Copy link
Collaborator

@sudo-suhas sudo-suhas commented May 1, 2018

This adds a new file resolveTaskFn which checks and returns different task functions depending on the OS. File paths passed to linters are chunked only on Windows as it is unnecessary everywhere else to the best of my understanding. Also includes some minor refactoring, renaming and docs update. I have not yet added tests, would like to get some feedback first.

Closes #430

@sudo-suhas sudo-suhas requested a review from okonet May 1, 2018 12:57
@codecov
Copy link

codecov bot commented May 1, 2018

Codecov Report

Merging #439 into master will increase coverage by 0.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
+ Coverage   98.18%   98.71%   +0.53%     
==========================================
  Files          11       12       +1     
  Lines         220      234      +14     
  Branches       25       27       +2     
==========================================
+ Hits          216      231      +15     
+ Misses          4        3       -1
Impacted Files Coverage Δ
src/printErrors.js 100% <ø> (ø) ⬆️
src/index.js 91.42% <ø> (+2.53%) ⬆️
src/makeCmdTasks.js 100% <100%> (ø)
src/resolveTaskFn.js 100% <100%> (ø)
src/runAll.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0924e78...02949d4. Read the comment docs.

okonet
okonet previously approved these changes May 2, 2018
Copy link
Collaborator

@okonet okonet left a comment

Choose a reason for hiding this comment

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

This is LGTM. I'm super low on time so I can't review properly. Please add tests and push forward.

Move some tests from makeCmdTasks to resolveTaskFn.
@sudo-suhas
Copy link
Collaborator Author

@okonet Adding the test commit dismissed your earlier review. Could you please take a look again?

@sudo-suhas sudo-suhas merged commit 1601c02 into master May 7, 2018
@sudo-suhas sudo-suhas deleted the feat/chunk-only-on-win branch May 7, 2018 02:49
kornicameister pushed a commit to kornicameister/korni that referenced this pull request May 23, 2018
## Overview

The following dependencies have been updated by [dependencies.io](https://www.dependencies.io/):

- `lint-staged` in `package.json` from "7.0.5" to "7.1.2"

## Details

### `lint-staged`

This dependency is located in `package.json` and was updated from "7.0.5" to "7.1.2".

<details>
<summary>7.1.0</summary>

# [7.1.0](lint-staged/lint-staged@v7.0.5...v7.1.0) (2018-05-07)


### Features

* Chunked execution of linters on Windows only ([#439](lint-staged/lint-staged#439)) ([1601c02](lint-staged/lint-staged@1601c02))

</details>

<details>
<summary>7.1.1</summary>

## [7.1.1](lint-staged/lint-staged@v7.1.0...v7.1.1) (2018-05-18)


### Bug Fixes

* **cli:** Correct value for FORCE_COLOR env var ([#451](lint-staged/lint-staged#451)) ([9823d26](lint-staged/lint-staged@9823d26)), closes [#448](lint-staged/lint-staged#448)

</details>

<details>
<summary>7.1.2</summary>

## [7.1.2](lint-staged/lint-staged@v7.1.1...v7.1.2) (2018-05-21)


### Bug Fixes

* **package:** Update cosmiconfig to version 5.0.2 ([#444](lint-staged/lint-staged#444)) ([2fc7aa3](lint-staged/lint-staged@2fc7aa3)), closes [#441](lint-staged/lint-staged#441)
* **package:** Update listr to version 0.14.1 ([#445](lint-staged/lint-staged#445)) ([a56d7c9](lint-staged/lint-staged@a56d7c9)), closes [#426](lint-staged/lint-staged#426)
* Add .lintstagedrc.js to list of config files to search ([9e27620](lint-staged/lint-staged@9e27620))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unneccessary chunking on macOS (and other unix based environments)
2 participants