From 1a8756f1663fef54d7c1358c386f8a40a1a45e27 Mon Sep 17 00:00:00 2001 From: rishijain Date: Wed, 18 Oct 2023 19:45:38 +0700 Subject: [PATCH] used name from file path --- CHANGELOG.md | 1 + lib/rubycritic/analysers/helpers/modules_locator.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffe68354..c53a8da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * [BUGFIX] Raise error when the same branches are compared (by [@rishijain][]) * [BUGFIX] Churn score was always 0 when rubycritic was executed from a sub-directory (by [@rishijain][]) * [BUGFIX] Use overview.html as the fallback path when files does not exist during compare option (by [@rishijain][]) +* [BUGFIX] Use name from the file path instead of fetching name from the parser (by [@rishijain][]) # v4.8.1 / 2023-05-17 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.8.0...v4.8.1) diff --git a/lib/rubycritic/analysers/helpers/modules_locator.rb b/lib/rubycritic/analysers/helpers/modules_locator.rb index aa7d8de2..e7fd5ef4 100644 --- a/lib/rubycritic/analysers/helpers/modules_locator.rb +++ b/lib/rubycritic/analysers/helpers/modules_locator.rb @@ -9,7 +9,7 @@ def initialize(analysed_module) end def first_name - names.first + name_from_path.first end def names