https://github.com/cyberfined/autoload-checker
Checks for conflicts in class/module definitions and corrects them.
https://github.com/cyberfined/autoload-checker
linter ruby
Last synced: 2 months ago
JSON representation
Checks for conflicts in class/module definitions and corrects them.
- Host: GitHub
- URL: https://github.com/cyberfined/autoload-checker
- Owner: cyberfined
- License: wtfpl
- Created: 2022-06-30T12:43:46.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-30T14:27:04.000Z (about 4 years ago)
- Last Synced: 2025-01-11T16:49:22.390Z (over 1 year ago)
- Topics: linter, ruby
- Language: Ruby
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autoload-checker
Checks for conflicts in class/module definitions and corrects them. For instance, you have
a file `foo/bar/baz.rb` with following content:
```ruby
module Foo
module Bar
class Baz
end
end
end
```
And a file `foo/bar.rb` with following content:
```ruby
module Foo
class Bar
end
end
```
So, when you start your app, "Bar is not a class" exception will be thrown. autoload_checker
detects conflict definitions and fix them by replacing `module Bar` with `class Bar`
in `foo/bar/baz.rb`.
# Usage
```
Usage: ./bin/autoload_checker.rb [options]
-p, --path DIR,... [Mandatory] directories to check
-c, --correct Enable errors correction
-h, --help Prints this help
```