Skip to content

Commit

Permalink
Merge pull request #72 from viralpraxis/ci-sync-linting-with-rubocop
Browse files Browse the repository at this point in the history
Sync CI linting with rubocop repo
  • Loading branch information
viralpraxis authored Dec 30, 2024
2 parents 215d0d2 + 913476e commit 6217596
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/lint.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Linting
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint-ruby:
name: Ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby # Latest stable CRuby version
bundler-cache: true
- name: internal_investigation
run: bundle exec rake internal_investigation

lint-yaml:
permissions:
contents: read # for actions/checkout to fetch code
name: Yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Yamllint
uses: karancode/[email protected]
with:
yamllint_strict: true
yamllint_format: parsable
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: default

rules:
comments:
min-spaces-from-content: 1
document-start: disable
empty-lines:
max: 1
line-length: disable
truthy:
check-keys: false
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
require 'bundler/gem_tasks'
require 'open3'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

Dir['tasks/**/*.rake'].each { |t| load t }

desc 'Run RuboCop over itself'
RuboCop::RakeTask.new(:internal_investigation)

RSpec::Core::RakeTask.new(:spec)

desc 'Confirm documentation is up to date'
Expand Down

0 comments on commit 6217596

Please sign in to comment.