Skip to content

Sider Runners πŸƒπŸƒβ€β™€οΈπŸ’¨

License

Notifications You must be signed in to change notification settings

gnakagaw/runners

Β 
Β 

Repository files navigation

Build

Sider Runners

This is a Sider analyzer framework.

See also another related project, called devon_rex.

Supported analyzers

All 40 analyzers are provided as a Docker image:

Name Links Status
Brakeman docker, source, doc, website βœ…
Checkstyle docker, source, doc, website βœ…
Clang-Tidy docker, source, doc, website βœ… beta
CoffeeLint docker, source, doc, website βœ…
Cppcheck docker, source, doc, website βœ…
cpplint docker, source, doc βœ…
detekt docker, source, doc, website βœ… beta
ESLint docker, source, doc, website βœ…
Flake8 docker, source, doc, website βœ…
FxCop docker, source, doc, website βœ… beta
GolangCI-Lint docker, source, doc, website βœ…
Goodcheck docker, source, doc, website βœ…
hadolint docker, source, doc βœ…
HAML-Lint docker, source, doc βœ…
JavaSee docker, source, doc βœ…
JSHint docker, source, doc, website βœ…
ktlint docker, source, doc, website βœ… beta
LanguageTool docker, source, doc, website βœ… beta
Metrics Code Clone docker, source, doc βœ… beta
Metrics Complexity docker, source, doc βœ… beta
Metrics File Info docker, source, doc βœ… beta
Misspell docker, source, doc βœ…
Phinder docker, source, doc βœ…
PHP_CodeSniffer docker, source, doc βœ…
PHPMD docker, source, doc, website βœ…
PMD CPD docker, source, doc, website βœ… beta
PMD Java docker, source, doc, website βœ…
Pylint docker, source, doc, website βœ… beta
Querly docker, source, doc βœ…
Rails Best Practices docker, source, doc, website βœ…
Reek docker, source, doc βœ…
remark-lint docker, source, doc βœ…
RuboCop docker, source, doc, website βœ…
SCSS-Lint docker, source, doc ⚠️ deprecated
ShellCheck docker, source, doc, website βœ…
Slim-Lint docker, source, doc βœ… beta
stylelint docker, source, doc, website βœ…
SwiftLint docker, source, doc, website βœ…
TSLint docker, source, doc, website ⚠️ deprecated
TyScan docker, source, doc βœ…

Developer guide

Please follow these instructions.

Prerequisites

Setup

First, after checking out the source code, run the following command to install Ruby:

$ rbenv install

If you don't want to use rbenv, you need to manually install Ruby with the version in the .ruby-version file.

Next, let's set up via Bundler:

$ bin/setup

All is done. The Rake tasks will help you develop! πŸ˜‰

Project structure

$ tree -F -L 1 -d
.
β”œβ”€β”€ bin
β”œβ”€β”€ docs
β”œβ”€β”€ exe
β”œβ”€β”€ images
β”œβ”€β”€ lib
β”œβ”€β”€ sig
β”œβ”€β”€ tasks
└── test

6 directories
  • bin: Scripts
  • docs: Documents
  • exe: Entry point
  • images: Docker images
  • lib: Core programs
  • sig: Ruby signature files for type-checking
  • tasks: Rake tasks
  • test: Unit tests and smoke tests

Testing

Unit test

You can run unit tests via the rake test command as follow.

All tests:

$ bundle exec rake test

Only a test file:

$ bundle exec rake test TEST=test/cli_test.rb

Only a test method:

$ bundle exec rake test TEST=test/cli_test.rb TESTOPTS='--name=test_parsing_options'

Smoke test

You can run smoke tests via the rake docker:smoke command as follow:

$ bundle exec rake docker:smoke ANALYZER=rubocop [ONLY=test1,test2,...] [DEBUG=(true|trace)]
  • ONLY: Specify test name(s). You can specify a comma-separated list.
  • DEBUG: Show debug log to your console.
    • DEBUG=true: All log.
    • DEBUG=trace: Only trace log (colored).

If you want to run tests right after changing code, you can run one command as follow:

$ bundle exec rake docker:build docker:smoke ANALYZER=rubocop

Debugging

You can use the rake docker:shell command to run a command directly in a Docker container, for example:

$ bundle exec rake docker:build docker:shell ANALYZER=rubocop
docker run ...
analyzer_runner@838f831e5aa7:/work$ cd test/smokes/rubocop/renamed-cop
analyzer_runner@838f831e5aa7:/work$ rubocop .
...

Type checking

We check the types of our Ruby source files via RBS and Steep.

$ bundle exec steep check [files_or_directories...]

To update the third-party gems' RBS, run:

$ bundle exec rake rbs:update_gems

License

See LICENSE.

About

Sider Runners πŸƒπŸƒβ€β™€οΈπŸ’¨

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 48.1%
  • C++ 31.8%
  • Shell 5.3%
  • Dockerfile 3.7%
  • C 2.2%
  • HTML 1.9%
  • Other 7.0%