-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
313 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Rubocop | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_ONLY: rubocop | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Run Rubocop | ||
run: bundle exec rubocop --parallel --format simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.5.0 | ||
SuggestExtensions: false | ||
NewCops: disable | ||
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Style/NumericPredicate: | ||
Description: 'This adds no efficiency nor space saving' | ||
Enabled: false | ||
|
||
Style/ZeroLengthPredicate: | ||
Description: 'This adds no efficiency nor space saving' | ||
Enabled: false | ||
|
||
Style/StderrPuts: | ||
Description: 'Replaces $stderr.puts with warn() which can suppress messages' | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
Description: 'This is often a red-herring' | ||
|
||
Metrics/MethodLength: | ||
Description: 'The style guide suggests 10 lines, bumping it up to the current maximum' | ||
Max: 21 | ||
|
||
Metrics/BlockLength: | ||
Description: 'The style guide suggests 10 lines, bumping it up to the current maximum' | ||
Max: 135 | ||
|
||
Layout/CommentIndentation: | ||
Exclude: | ||
- 'spec/spec_helper.rb' | ||
|
||
Style/BlockComments: | ||
Exclude: | ||
- 'spec/spec_helper.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2023-06-21 22:59:09 UTC using RuboCop version 1.52.1. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 3 | ||
Security/Open: | ||
Exclude: | ||
- 'misc/convert_mysql_err' | ||
- 'spec/lib/fingerprint_self_test_spec.rb' | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: AllowedVariables. | ||
Style/GlobalVars: | ||
Exclude: | ||
- 'bin/recog_standardize' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
require "bundler/gem_tasks" | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/gem_tasks' | ||
|
||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new do |t| | ||
t.pattern = 'spec/**/*_spec.rb' | ||
t.pattern = 'spec/**/*_spec.rb' | ||
end | ||
|
||
require 'yard' | ||
require 'yard/rake/yardoc_task' | ||
YARD::Rake::YardocTask.new do |t| | ||
t.files = ['bin/*.rb', '-', 'README.md'] | ||
t.files = ['bin/*.rb', '-', 'README.md'] | ||
end | ||
|
||
require 'cucumber' | ||
require 'cucumber/rake/task' | ||
|
||
Cucumber::Rake::Task.new(:features) do |t| | ||
t.cucumber_opts = %w(features --format pretty) | ||
t.cucumber_opts = %w[features --format pretty] | ||
end | ||
|
||
task :default => [ :tests, :yard ] | ||
task :tests => [ :spec, :features ] | ||
task default: %i[tests yard] | ||
task tests: %i[spec features] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require 'optparse' | ||
require 'ostruct' | ||
|
||
# Cleanup trailing whitespace around fingerprints | ||
Dir[ File.expand_path(File.join(File.dirname(__FILE__), "..", "xml")) + "/*.xml" ].each do |f| | ||
data = File.read(f). | ||
gsub(/\s+$/, ''). # Trailing whitespace and empty lines | ||
gsub("</fingerprint>", "</fingerprint>\n"). # Every fingerprint should have an empty line after it | ||
gsub("-->", "-->\n") # Every comment should have an empty line after it | ||
Dir["#{File.expand_path(File.join(File.dirname(__FILE__), '..', 'xml'))}/*.xml"].each do |f| | ||
data = File.read(f) | ||
.gsub(/\s+$/, '') # Trailing whitespace and empty lines | ||
.gsub('</fingerprint>', "</fingerprint>\n") # Every fingerprint should have an empty line after it | ||
.gsub('-->', "-->\n") # Every comment should have an empty line after it | ||
|
||
File.write(f, data) | ||
end | ||
File.write(f, data) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.