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

Fix typos #331

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ As such, a _Feature_ would map to either major (breaking change) or minor. A _bu
The old `mf_debug` and `mf_log` main mixin is presevered. Needs documentation. See #113. (Benjamin Fleischer, a49bfdd182)
* Use *launchy* (new dependency) when opening output files. (Nick Veys, #224)
* Coverage formatter now behaves like SimpleCov; it ignores certain lines in
calculating the precent run. Fixes #153, #222 (Benjamin Fleischer, #226).
calculating the percent run. Fixes #153, #222 (Benjamin Fleischer, #226).
- Thanks to @crv for the test in #153
- Note: JRuby will usually report different Coverage from MRI. This is a known issue.
- Note: This technically is a *breaking change* from how RCov works. But wwe don't run RCov anymore. (65bf21723291f)
Expand All @@ -86,7 +86,7 @@ As such, a _Feature_ would map to either major (breaking change) or minor. A _bu
* Rename ReekHotspot to MetricFu::ReekHotspot. Was missing namespace. (Benjamin Fleischer, a3aa70c1a9)
* Allow failures for Ruby 2.1, in addition to rbx per issues with rvm. (Benjamin Fleischer, 3018b22)
* `spec/quality_spec.rb` checks for whitespace, tabs, quotes, etc. `rake spec` also checks for warnings. (Benjamin Fleischer, b0c51bb9b17)
* When run with COVERAGE=true, will ouptut a file to `coverage/coverage_percent.txt` that can be checked via `rake check_code_coverage`. Borrowed from VCR. (Benjamin Fleischer, 32df3a34c6)
* When run with COVERAGE=true, will output a file to `coverage/coverage_percent.txt` that can be checked via `rake check_code_coverage`. Borrowed from VCR. (Benjamin Fleischer, 32df3a34c6)

### [4.10.0 / 2014-04-01](https://github.com/metricfu/metric_fu/compare/v4.9.0...v4.10.0)

Expand Down Expand Up @@ -284,7 +284,7 @@ add all contriubtors
* Skip reek when no files are found to run against. Otherwise, reek hangs trying to read from STDIN (Benjamin Fleischer, #119, #121)
* Reek will now find files on Windows. Remove *nix-specific '/' directory separators from Reek file glob. (Benjamin Fleischer, #119, #121)
* Link to correct reek url on report. (Calveto #116)
* Hack to accomodate Rails Best Practices dependency Code Analyzer monkey patch of Sexp (Benjamin Fleischer #123, #124)
* Hack to accommodate Rails Best Practices dependency Code Analyzer monkey patch of Sexp (Benjamin Fleischer #123, #124)
* Misc
* Moved environmental concerns into an Environment module ( Benjamin Fleischer / Robin Curry #91, #111)
* Exposed RubyParser patch ( Benjamin Fleischer / Robin Curry #91, #111)
Expand Down Expand Up @@ -435,7 +435,7 @@ add all contriubtors
* MetricFu::MetricAnalyzer
* MetricFu::AnalysisError
* MetricFu::HotspotScoringStrategies
* Rename MetricAnalyzer to HotspotAnalyzer, and rename all <metric>Analzyer classes to <metric>Hotspot to signify that they are part of the Hotspot code -Benjamin Fleischer
* Rename MetricAnalyzer to HotspotAnalyzer, and rename all <metric>Analyzer classes to <metric>Hotspot to signify that they are part of the Hotspot code -Benjamin Fleischer

### MetricFu 2.1.3.4 / 2012-12-28

Expand Down
6 changes: 3 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ instance variables and accessors

* Look into issues for the tools metric_fu uses
* Look into other tools that might work well
* Update contributing or issue guidlines
* Update contributing or issue guidelines
* Suggest commit message guidelines
* [Update the homepage](https://github.com/metricfu/metricfu.github.com)

## Future Thoughts

* Look into how to manage plugins or otherwise load abritrary metrics
* Look into how to manage plugins or otherwise load arbitrary metrics
* [Hoe](https://github.com/seattlerb/hoe/blob/master/lib/hoe.rb#L301)
* CLI [Flog](https://github.com/seattlerb/flog/blob/master/lib/flog_cli.rb) Plugins [Flog](https://github.com/seattlerb/flog/blob/master/lib/flog_cli.rb#L34)
* Look into adding
* https://github.com/metricfu/code_statistics [1](https://github.com/cloudability/code_statistics)
* or extract from rails into a gem [rake task](https://github.com/rails/rails/blob/master/railties/lib/rails/tasks/statistics.rake) [can be modified by rspec](https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/tasks/rspec.rake#L38) with the [calculator](https://github.com/rails/rails/blob/master/railties/lib/rails/code_statistics_calculator.rb) and [class](https://github.com/rails/rails/blob/master/railties/lib/rails/code_statistics.rb)
* brakeman https://github.com/metricfu/brakeman
* laser https://github.com/metricfu/laser
* Other intersting libraries to consider:
* Other interesting libraries to consider:
* https://gist.github.com/4562865 for generating Flog on ERB templates by jamesmartin
* https://github.com/chad/turbulence churn and complexity (flog)
* https://github.com/vinibaggio/discover-unused-partials
Expand Down
2 changes: 1 addition & 1 deletion lib/metric_fu/data_structures/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def self.for(class_or_method_name)
begin
match = class_or_method_name.match(/(.*)((\.|\#|\:\:[a-z])(.+))/)
rescue => error
# new error during port to metric_fu occasionally a unintialized
# new error during port to metric_fu occasionally a uninitialized
# MatchData object shows up here. Not expected.
mf_debug "ERROR on getting location for #{class_or_method_name} #{error.inspect}"
match = nil
Expand Down
2 changes: 1 addition & 1 deletion lib/metric_fu/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module MetricFu
# named after the metric under the scratch_directory, where
# any output from the #emit method should go.
#
# It will also create the output_directory if neccessary, and
# It will also create the output_directory if necessary, and
# in general setup the directory structure that the MetricFu system
# expects.
class Generator
Expand Down
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/flay/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def generate_records(data, table)
end

def present_group(group)
occurences = group.size
"found #{occurences} code duplications"
occurrences = group.size
"found #{occurrences} code duplications"
end
end
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/flog/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def generate_records(data, table)
end

def present_group(group)
occurences = group.size
occurrences = group.size
complexity = get_mean(group.column("score"))
"#{'average ' if occurences > 1}complexity is %.1f" % complexity
"#{'average ' if occurrences > 1}complexity is %.1f" % complexity
end
end
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/rcov/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def generate_records(data, table)
end

def present_group(group)
occurences = group.size
occurrences = group.size
average_code_uncoverage = get_mean(group.column("percentage_uncovered"))
"#{'average ' if occurences > 1}uncovered code is %.1f%" % average_code_uncoverage
"#{'average ' if occurrences > 1}uncovered code is %.1f%" % average_code_uncoverage
end
end
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/reek/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def self.numeric_smell?(type)
end

def present_group(group)
occurences = group.size
"found #{occurences} code smells"
occurrences = group.size
"found #{occurrences} code smells"
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/roodi/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def generate_records(data, table)
end

def present_group(group)
occurences = group.size
"found #{occurences} design problems"
occurrences = group.size
"found #{occurrences} design problems"
end
end
4 changes: 2 additions & 2 deletions lib/metric_fu/metrics/saikuro/hotspot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def generate_records(data, table)
end

def present_group(group)
occurences = group.size
occurrences = group.size
complexity = get_mean(group.column("complexity"))
"#{'average ' if occurences > 1}complexity is %.1f" % complexity
"#{'average ' if occurrences > 1}complexity is %.1f" % complexity
end
end
2 changes: 1 addition & 1 deletion lib/metric_fu/metrics/saikuro/metric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def default_run_options
filter_cyclo: "0",
warn_cyclo: "5",
error_cyclo: "7",
formater: "text",
formatter: "text",
}
end

Expand Down
4 changes: 2 additions & 2 deletions lib/metric_fu/templates/javascripts/bluff_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ chart.legend_font_size = "12px";
chart.marker_font_size = "10px";
chart.title = graph_title;
for(var i = 0; i < graph_series.length; i++) {
var serie = graph_series[i];
chart.data(serie.name, serie.data);
var series = graph_series[i];
chart.data(series.name, series.data);
}
chart.labels = graph_labels;
chart.draw();
2 changes: 1 addition & 1 deletion lib/metric_fu/templates/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module MetricFu
module Templates
class Report < MetricFu::Template
# @param file [String] the analyzed file to annotate
# @param lines [Hash] of line number [String] keyed to an list [[Array] of metrics for that line. Each metric in the list is a hash containing the keys :type => metric_name, :descrption => metric_score
# @param lines [Hash] of line number [String] keyed to an list [[Array] of metrics for that line. Each metric in the list is a hash containing the keys :type => metric_name, :description => metric_score
# @example file and lines
# file: "lib/metric_fu/gem_version.rb
# lines: {"30"=>[{:type=>:flog, :description=>"Score of 22.43"}], "42"=>[{:type=>:flog, :description=>"Score of 8.64"}]}
Expand Down
2 changes: 1 addition & 1 deletion lib/metric_fu/templates/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def erb_template_source(template_file)
erb
end

# Copies an instance variable mimicing the name of the section
# Copies an instance variable mimicking the name of the section
# we are trying to render, with a value equal to the passed in
# constant. Allows the concrete template classes to refer to
# that instance variable from their ERB rendering
Expand Down
6 changes: 3 additions & 3 deletions spec/fixtures/20090630.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@
- :was_run: true
:content: " :error_cyclo => \"7\","
- :was_run: true
:content: " :formater => \"text\"}"
:content: " :formatter => \"text\"}"
- :was_run: true
:content: " @churn = {}"
- :was_run: true
Expand Down Expand Up @@ -2682,7 +2682,7 @@
- :was_run: true
:content: " #"
- :was_run: true
:content: " # It will also create the MetricFu.output_directory if neccessary, and"
:content: " # It will also create the MetricFu.output_directory if necessary, and"
- :was_run: true
:content: " # in general setup the directory structure that the MetricFu system"
- :was_run: true
Expand Down Expand Up @@ -3159,7 +3159,7 @@
- :was_run: true
:content: " "
- :was_run: true
:content: " # Copies an instance variable mimicing the name of the section"
:content: " # Copies an instance variable mimicking the name of the section"
- :was_run: true
:content: " # we are trying to render, with a value equal to the passed in "
- :was_run: true
Expand Down
2 changes: 1 addition & 1 deletion spec/metric_fu/formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
end
end

context "given a custom formatter that doesnt exist" do
context "given a custom formatter that doesn't exist" do
subject { MetricFu::Formatter.class_for("MyNonExistentCustomFormatter") }

it "raises an error" do
Expand Down
2 changes: 1 addition & 1 deletion spec/metric_fu/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def to_h
@container.destroy!
end

it "should return entire pathlist given no exclude pattens" do
it "should return entire pathlist given no exclude patterns" do
files = @concrete_class.remove_excluded_files(@paths)
expect(files).to eq(@paths)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

describe "analyze method" do
let(:error) { ::RailsBestPractices::Core::Error.new }
context "RailsBestPractices provdies the expected API" do
context "RailsBestPractices provides the expected API" do
it { expect(error).to respond_to :filename }
it { expect(error).to respond_to :line_number }
it { expect(error).to respond_to :message }
Expand Down
2 changes: 1 addition & 1 deletion spec/metric_fu/metrics/rcov/simplecov_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
result = SimpleCov.result # end coverage
source_file = result.source_files.first

# formatter ouputs this from simplecov result
# formatter outputs this from simplecov result
rcov_text = SimpleCov::Formatter::MetricFu::FormatLikeRCov.new(result).format

# generator analyzes the rcov text
Expand Down
4 changes: 2 additions & 2 deletions spec/metric_fu/metrics/saikuro/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:filter_cyclo => '0',
:warn_cyclo => '5',
:error_cyclo => '7',
:formater => 'text' }" do
:formatter => 'text' }" do
load_metric "saikuro"
expect(MetricFu::Metric.get_metric(:saikuro).run_options).to eq(
output_directory: "#{scratch_directory}/saikuro",
Expand All @@ -18,7 +18,7 @@
filter_cyclo: "0",
warn_cyclo: "5",
error_cyclo: "7",
formater: "text"
formatter: "text"
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/usage_test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
expect(test_result.success).to eq(true)
end
specify "fails when the command runs with an error" do
code = "sandwhich_fu ruby"
code = "sandwich_fu ruby"
test_result = SnippetRunner.new(code, "sh").run_code
expect(test_result.captured_output).to match(failed_command_error)
expect(test_result.success).to eq(false)
Expand Down
Loading