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

various: fix miscellaneous typos #509

Merged
merged 1 commit into from Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -121,7 +121,7 @@ Hide the `Errors: X` at the end of the list:
$ spoom tc --no-count
```

List only the errors comming from specific directories or files:
List only the errors coming from specific directories or files:

```
$ spoom tc file1.rb path1/ path2/
Expand Down
2 changes: 1 addition & 1 deletion lib/spoom/cli/coverage.rb
Expand Up @@ -53,7 +53,7 @@ def timeline
end

unless context.git_workdir_clean?
say_error("Uncommited changes")
say_error("Uncommitted changes")
say_error(<<~ERR, status: nil)

Spoom needs to checkout into your previous commits to build the timeline."
Expand Down
2 changes: 1 addition & 1 deletion lib/spoom/cli/lsp.rb
Expand Up @@ -36,7 +36,7 @@ def list
end
end

desc "hover", "Request hover informations"
desc "hover", "Request hover information"
# TODO: options, filter, limit, kind etc.. filter rbi
def hover(file, line, col)
run do |client|
Expand Down
4 changes: 2 additions & 2 deletions lib/spoom/context/git.rb
Expand Up @@ -9,7 +9,7 @@ class Commit < T::Struct
class << self
extend T::Sig

# Parse a line formated as `%h %at` into a `Commit`
# Parse a line formatted as `%h %at` into a `Commit`
sig { params(string: String).returns(T.nilable(Commit)) }
def parse_line(string)
sha, epoch = string.split(" ", 2)
Expand Down Expand Up @@ -127,7 +127,7 @@ def git_show(*arg)
git("show #{arg.join(" ")}")
end

# Is there uncommited changes in this context directory?
# Is there uncommitted changes in this context directory?
sig { params(path: String).returns(T::Boolean) }
def git_workdir_clean?(path: ".")
git_diff("HEAD").out.empty?
Expand Down
4 changes: 2 additions & 2 deletions lib/spoom/context/sorbet.rb
Expand Up @@ -75,13 +75,13 @@ def srb_files(with_config: nil, include_rbis: true)
# From Sorbet docs on `--ignore`:
# > Ignores input files that contain the given string in their paths (relative to the input path passed to
# > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring
# > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and
# > matches. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and
# > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`.
string = if string.start_with?("/")
# Strings beginning with / match against the prefix of these relative paths
File.join(absolute_path, string)
else
# Others are substring matchs
# Others are substring matches
File.join(absolute_path, "**", string)
end
# Matches must be against whole folder and file names
Expand Down
2 changes: 1 addition & 1 deletion lib/spoom/sorbet/errors.rb
Expand Up @@ -76,7 +76,7 @@ def error_line_match_regexp(error_url_base)
^ # match beginning of line
(\S[^:]*) # capture filename as something that starts with a non-space character
# followed by anything that is not a colon character
: # match the filename - line number seperator
: # match the filename - line number separator
(\d+) # capture the line number
:\s # match the line number - error message separator
(.*) # capture the error message
Expand Down
4 changes: 2 additions & 2 deletions lib/spoom/sorbet/lsp/structures.rb
Expand Up @@ -182,7 +182,7 @@ class Diagnostic < T::Struct
const :range, LSP::Range
const :code, Integer
const :message, String
const :informations, Object
const :information, Object

class << self
extend T::Sig
Expand All @@ -193,7 +193,7 @@ def from_json(json)
range: Range.from_json(json["range"]),
code: json["code"].to_i,
message: json["message"],
informations: json["relatedInformation"],
information: json["relatedInformation"],
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/spoom/context/sorbet_test.rb
Expand Up @@ -335,7 +335,7 @@ def test_context_srb_files_with_custom_ignore
# From Sorbet docs on `--ignore`:
# > Ignores input files that contain the given string in their paths (relative to the input path passed to
# > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring
# > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and
# > matches. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and
# > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`.
assert_equal(["foo.rb", "foo2/bar.rb"], context.srb_files)

Expand Down
2 changes: 1 addition & 1 deletion test/spoom/deadcode/plugins/ruby_test.rb
Expand Up @@ -65,7 +65,7 @@ def dead; end
assert_dead(index, "dead")
end

def test_alive_trys
def test_alive_tries
@project.write!("foo.rb", <<~RB)
try(:alive1)
try :alive2, :dead, nil
Expand Down