autocorrect
This commit is contained in:
parent
120bb4b79a
commit
604fe35be6
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ parser = OptionParser.new do |opt|
|
|||
<<~DOC
|
||||
Shell command to format files, will run once per file. Occurrences of the placeholder `{}` will \
|
||||
be replaced with a path to the file being formatted. \
|
||||
(Example: "prettier --stdin-filepath \'{}\'")
|
||||
(Example: "prettier --stdin-filepath '{}'")
|
||||
DOC
|
||||
) do |o|
|
||||
parameters[:formatter] = o
|
||||
|
|
|
@ -39,7 +39,7 @@ module FormatStaged
|
|||
return false unless formatted.size == files.size
|
||||
|
||||
quiet = @verbose ? [] : ['--quiet']
|
||||
return !write || get_status('git', 'diff-index', '--cached', '--exit-code', *quiet, 'HEAD') != 0
|
||||
!write || get_status('git', 'diff-index', '--cached', '--exit-code', *quiet, 'HEAD') != 0
|
||||
end
|
||||
|
||||
def repo_root
|
||||
|
|
|
@ -132,7 +132,7 @@ describe FormatStaged do
|
|||
repo.set_content 'test.test', 'a=b'
|
||||
repo.stage 'test.test'
|
||||
|
||||
expect(repo.run_formatter write: false).to be_truthy
|
||||
expect(repo.run_formatter(write: false)).to be_truthy
|
||||
expect(repo.get_content('test.test')).to eq 'a=b'
|
||||
expect(repo.get_staged('test.test')).to eq 'a=b'
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue