source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/code_spell_check_spec.rb | Ruby | mit | 3,997 | main | 1,119 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::CodeSpellCheck do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/w3c_css_spec.rb | Ruby | mit | 3,997 | main | 2,038 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::W3cCss do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:fake_exception) { Class.new(StandardError) }
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/rst_lint_spec.rb | Ruby | mit | 3,997 | main | 1,096 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RstLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/berksfile_check_spec.rb | Ruby | mit | 3,997 | main | 1,216 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::BerksfileCheck do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when Berksfile.lock is ignored' do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/flay_spec.rb | Ruby | mit | 3,997 | main | 1,235 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Flay do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:applicable_files) { %w[file1.rb] }
subject { described_class.new(config, context) }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pyflakes_spec.rb | Ruby | mit | 3,997 | main | 1,251 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pyflakes do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/html_hint_spec.rb | Ruby | mit | 3,997 | main | 988 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::HtmlHint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/standard_spec.rb | Ruby | mit | 3,997 | main | 1,119 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Standard do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/forbidden_branches_spec.rb | Ruby | mit | 3,997 | main | 1,190 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ForbiddenBranches do
let(:default_config) { Overcommit::ConfigurationLoader.default_configuration }
let(:branch_patterns) { ['master', 'release/*'] }
let(:config) do
default_config.merge(
Overcommit::Configuratio... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/js_hint_spec.rb | Ruby | mit | 3,997 | main | 1,340 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::JsHint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/case_conflicts_spec.rb | Ruby | mit | 3,997 | main | 942 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::CaseConflicts do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
Overcommit::GitRepo.stub(:initi... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/execute_permissions_spec.rb | Ruby | mit | 3,997 | main | 1,660 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ExecutePermissions do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:staged_file) { 'filename.txt' }
d... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/go_vet_spec.rb | Ruby | mit | 3,997 | main | 1,259 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::GoVet do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_ret... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/semi_standard_spec.rb | Ruby | mit | 3,997 | main | 1,131 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::SemiStandard do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/python_flake8_spec.rb | Ruby | mit | 3,997 | main | 1,272 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::PythonFlake8 do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/scalariform_spec.rb | Ruby | mit | 3,997 | main | 1,567 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Scalariform do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).a... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/file_size_spec.rb | Ruby | mit | 3,997 | main | 1,252 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::FileSize do
let(:config) do
Overcommit::ConfigurationLoader.default_configuration.merge(
Overcommit::Configuration.new(
'PreCommit' => {
'FileSize' => {
'size_limit_bytes' => 10
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/html_tidy_spec.rb | Ruby | mit | 3,997 | main | 1,393 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::HtmlTidy do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/coffee_lint_spec.rb | Ruby | mit | 3,997 | main | 1,652 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::CoffeeLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pep8_spec.rb | Ruby | mit | 3,997 | main | 1,249 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pep8 do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_retu... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/ruby_syntax_spec.rb | Ruby | mit | 3,997 | main | 1,215 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RubySyntax do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/chamber_security_spec.rb | Ruby | mit | 3,997 | main | 839 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ChamberSecurity do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicabl... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/rails_best_practices_spec.rb | Ruby | mit | 3,997 | main | 1,407 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RailsBestPractices do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_f... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/reek_spec.rb | Ruby | mit | 3,997 | main | 1,726 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Reek do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_retu... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/erb_lint_spec.rb | Ruby | mit | 3,997 | main | 1,130 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ErbLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/w3c_html_spec.rb | Ruby | mit | 3,997 | main | 2,041 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::W3cHtml do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:fake_exception) { Class.new(StandardError) }
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/stylelint_spec.rb | Ruby | mit | 3,997 | main | 2,246 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Stylelint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/hard_tabs_spec.rb | Ruby | mit | 3,997 | main | 784 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::HardTabs do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:staged_file) { 'filename.txt' }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/hlint_spec.rb | Ruby | mit | 3,997 | main | 1,399 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Hlint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
before do
su... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/hadolint_spec.rb | Ruby | mit | 3,997 | main | 1,835 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Hadolint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:applicable_files) { %w[Dockerfile Dockerfile.web] }
subject { described_class.new(config, conte... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/chamber_compare_spec.rb | Ruby | mit | 3,997 | main | 833 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ChamberCompare do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pylint_spec.rb | Ruby | mit | 3,997 | main | 1,280 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pylint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/xml_lint_spec.rb | Ruby | mit | 3,997 | main | 1,142 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::XmlLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_r... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/merge_conflicts_spec.rb | Ruby | mit | 3,997 | main | 1,035 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::MergeConflicts do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:staged_file) { 'filename.txt' }
subject { described_class.new(config, ... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/dart_analyzer_spec.rb | Ruby | mit | 3,997 | main | 1,308 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::DartAnalyzer do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/shell_check_spec.rb | Ruby | mit | 3,997 | main | 1,459 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ShellCheck do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/php_stan_spec.rb | Ruby | mit | 3,997 | main | 1,320 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::PhpStan do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_r... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/nginx_test_spec.rb | Ruby | mit | 3,997 | main | 932 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::NginxTest do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/golangci_lint_spec.rb | Ruby | mit | 3,997 | main | 2,547 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::GolangciLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:files) do
%w[
pkg1/file1.go
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/kt_lint_spec.rb | Ruby | mit | 3,997 | main | 1,006 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::KtLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/yarn_check_spec.rb | Ruby | mit | 3,997 | main | 2,305 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::YarnCheck do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when yarn.lock is ignored' do
around... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/image_optim_spec.rb | Ruby | mit | 3,997 | main | 1,439 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ImageOptim do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/line_endings_spec.rb | Ruby | mit | 3,997 | main | 1,879 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::LineEndings do
let(:config) do
Overcommit::ConfigurationLoader.default_configuration.merge(
Overcommit::Configuration.new(
'PreCommit' => {
'LineEndings' => {
'eol' => eol
}
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/author_email_spec.rb | Ruby | mit | 3,997 | main | 1,820 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::AuthorEmail do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
shared_examp... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/go_lint_spec.rb | Ruby | mit | 3,997 | main | 1,201 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::GoLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/ruby_lint_spec.rb | Ruby | mit | 3,997 | main | 1,240 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RubyLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/slim_lint_spec.rb | Ruby | mit | 3,997 | main | 1,252 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::SlimLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/phpcs_spec.rb | Ruby | mit | 3,997 | main | 2,140 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::PhpCs do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_ret... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pep257_spec.rb | Ruby | mit | 3,997 | main | 1,056 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pep257 do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/fix_me_spec.rb | Ruby | mit | 3,997 | main | 1,021 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::FixMe do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:staged_file) { 'filename.txt' }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/go_fmt_spec.rb | Ruby | mit | 3,997 | main | 2,477 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::GoFmt do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:files) do
%w[
pkg1/file1.go
pkg1... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/rubo_cop_spec.rb | Ruby | mit | 3,997 | main | 3,022 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RuboCop do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_r... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/es_lint_spec.rb | Ruby | mit | 3,997 | main | 2,242 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::EsLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/bundle_audit_spec.rb | Ruby | mit | 3,997 | main | 2,069 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::BundleAudit do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when Gemfile.lock is ignored' do
a... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/chamber_verification_spec.rb | Ruby | mit | 3,997 | main | 1,563 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ChamberVerification do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:appli... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/fasterer_spec.rb | Ruby | mit | 3,997 | main | 1,718 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Fasterer do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:applicable_files) { %w[file1.rb file2.rb] }
subject { described_class.new(config, context) }
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/jsl_spec.rb | Ruby | mit | 3,997 | main | 1,260 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Jsl do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_retur... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/bundle_outdated_spec.rb | Ruby | mit | 3,997 | main | 2,191 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::BundleOutdated do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when Gemfile.lock is ignored' do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/java_checkstyle_spec.rb | Ruby | mit | 3,997 | main | 2,185 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::JavaCheckstyle do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/yaml_lint_spec.rb | Ruby | mit | 3,997 | main | 1,731 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::YamlLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:applicable_files) { %w[file1.yaml file2.yml] }
subject { described_class.new(config, context) }... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/terraform_format_spec.rb | Ruby | mit | 3,997 | main | 1,122 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::TerraformFormat do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_file... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/broken_symlinks_spec.rb | Ruby | mit | 3,997 | main | 709 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::BrokenSymlinks do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:staged_file) { 'staged-file.txt' }
subject { described_class.new(config, context) }
be... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/js_lint_spec.rb | Ruby | mit | 3,997 | main | 1,030 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::JsLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/cook_style_spec.rb | Ruby | mit | 3,997 | main | 3,030 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::CookStyle do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/scss_lint_spec.rb | Ruby | mit | 3,997 | main | 2,438 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::ScssLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/foodcritic_spec.rb | Ruby | mit | 3,997 | main | 3,979 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Foodcritic do
let(:context) { double('context') }
let(:result) { double(success?: true) }
subject { described_class.new(config, context) }
before do
modified_files = applicable_files.map do |file|
File.join(Ov... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/author_name_spec.rb | Ruby | mit | 3,997 | main | 1,146 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::AuthorName do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
shared_exampl... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/vint_spec.rb | Ruby | mit | 3,997 | main | 1,191 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Vint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
before do
sub... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/local_paths_in_gemfile_spec.rb | Ruby | mit | 3,997 | main | 2,043 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::LocalPathsInGemfile do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:staged_file) { 'Gemfile' }
subject { described_class.new(config, ... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/jscs_spec.rb | Ruby | mit | 3,997 | main | 1,208 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Jscs do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_retu... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/bundle_check_spec.rb | Ruby | mit | 3,997 | main | 1,572 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::BundleCheck do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when Gemfile.lock is ignored' do
a... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/phpcs_fixer_spec.rb | Ruby | mit | 3,997 | main | 2,787 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::PhpCsFixer do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/rails_schema_up_to_date_spec.rb | Ruby | mit | 3,997 | main | 7,066 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RailsSchemaUpToDate do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:ruby_schema_file) { 'db/schema.rb' }
let(:sql_schema_file) { ... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/ts_lint_spec.rb | Ruby | mit | 3,997 | main | 1,676 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::TsLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/r_spec_spec.rb | Ruby | mit | 3,997 | main | 4,544 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RSpec do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when rspec exits successfully' do
let(:r... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/scalastyle_spec.rb | Ruby | mit | 3,997 | main | 4,708 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Scalastyle do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/license_header_spec.rb | Ruby | mit | 3,997 | main | 1,245 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::LicenseHeader do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
around do |example|
repo do
example... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/credo_spec.rb | Ruby | mit | 3,997 | main | 1,143 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Credo do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_ret... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/swift_lint_spec.rb | Ruby | mit | 3,997 | main | 1,033 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::SwiftLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/mdl_spec.rb | Ruby | mit | 3,997 | main | 1,423 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Mdl do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:result) { double('result') }
before do
resu... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/solargraph_spec.rb | Ruby | mit | 3,997 | main | 3,591 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Solargraph do
let(:config) do
Overcommit::ConfigurationLoader.default_configuration.merge(
Overcommit::Configuration.new(
'PreCommit' => {
'Solargraph' => {
'problem_on_unmodified_line' ... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pydocstyle_spec.rb | Ruby | mit | 3,997 | main | 1,068 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pydocstyle do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/json_syntax_spec.rb | Ruby | mit | 3,997 | main | 824 | # frozen_string_literal: true
require 'spec_helper'
require 'json'
describe Overcommit::Hook::PreCommit::JsonSyntax do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
let(:staged_file) { 'my_file.json' }
subject { described_class.n... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/rake_target_spec.rb | Ruby | mit | 3,997 | main | 1,382 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::RakeTarget do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'without targets parameters' do
let(... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/travis_lint_spec.rb | Ruby | mit | 3,997 | main | 946 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::TravisLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).an... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/css_lint_spec.rb | Ruby | mit | 3,997 | main | 2,057 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::CssLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_r... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/license_finder_spec.rb | Ruby | mit | 3,997 | main | 877 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::LicenseFinder do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
context 'when license_finder exits succ... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/xml_syntax_spec.rb | Ruby | mit | 3,997 | main | 754 | # frozen_string_literal: true
require 'spec_helper'
require 'rexml/document'
describe Overcommit::Hook::PreCommit::XmlSyntax do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:staged_file) { 'file... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/haml_lint_spec.rb | Ruby | mit | 3,997 | main | 1,253 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::HamlLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/sorbet_spec.rb | Ruby | mit | 3,997 | main | 1,336 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Sorbet do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pycodestyle_spec.rb | Ruby | mit | 3,997 | main | 1,270 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pycodestyle do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).a... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/dogma_spec.rb | Ruby | mit | 3,997 | main | 1,382 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Dogma do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_ret... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/yaml_syntax_spec.rb | Ruby | mit | 3,997 | main | 777 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::YamlSyntax do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
let(:staged_file) { 'file1.yml' }
before do
... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/puppet_metadata_json_lint_spec.rb | Ruby | mit | 3,997 | main | 1,781 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::PuppetMetadataJsonLint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicab... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/yard_coverage_spec.rb | Ruby | mit | 3,997 | main | 2,867 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::YardCoverage do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/pronto_spec.rb | Ruby | mit | 3,997 | main | 1,778 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Pronto do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/pre_commit/sqlint_spec.rb | Ruby | mit | 3,997 | main | 1,389 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PreCommit::Sqlint do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:applicable_files).and_re... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/prepare_commit_msg/replace_branch_spec.rb | Ruby | mit | 3,997 | main | 5,148 | # frozen_string_literal: true
require 'spec_helper'
require 'overcommit/hook_context/prepare_commit_msg'
describe Overcommit::Hook::PrepareCommitMsg::ReplaceBranch do
def checkout_branch(branch)
allow(Overcommit::GitRepo).to receive(:current_branch).and_return(branch)
end
def new_config(opts = {})
defa... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/prepare_commit_msg/base_spec.rb | Ruby | mit | 3,997 | main | 1,397 | # frozen_string_literal: true
require 'spec_helper'
require 'overcommit/hook_context/prepare_commit_msg'
describe Overcommit::Hook::PrepareCommitMsg::Base do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { Overcommit::HookContext::PrepareCommitMsg.new(config, [], StringIO.n... |
github | sds/overcommit | https://github.com/sds/overcommit | spec/overcommit/hook/post_checkout/index_tags_spec.rb | Ruby | mit | 3,997 | main | 357 | # frozen_string_literal: true
require 'spec_helper'
describe Overcommit::Hook::PostCheckout::IndexTags do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
before do
subject.stub(:execute_in_backgro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.