Skip to content

Commit

Permalink
Add EditorConfig file
Browse files Browse the repository at this point in the history
More info here: https://editorconfig.org/

For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig

Also fix some offenses.
  • Loading branch information
AlexWayfer committed Mar 17, 2021
1 parent fae666b commit 29402e7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80

[*.zsh]
indent_size = 4
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/optparse.

2 changes: 1 addition & 1 deletion misc/rb_optparse.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ _rb_optparse() {
}

rb_optparse () {
[ $# = 0 ] || complete -o default -F _rb_optparse "$@"
[ $# = 0 ] || complete -o default -F _rb_optparse "$@"
}
4 changes: 2 additions & 2 deletions misc/rb_optparse.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ generate-complete-function/ruby/optparse ()
mkdir -p "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}"
$1 "--*-completion-zsh=${1:t}" >! "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}/$cmpl"
if [[ $(type -w "$cmpl") == "${cmpl}: function" ]]; then
unfunction "$cmpl"
autoload -U "$cmpl"
unfunction "$cmpl"
autoload -U "$cmpl"
else
compinit "$cmpl"
fi
Expand Down
1 change: 0 additions & 1 deletion test/optparse/test_acceptable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,3 @@ def test_decimal_numeric
end

end

0 comments on commit 29402e7

Please sign in to comment.