<commit_before>name: Linting

on:
  push:
    branches:
      - main
  pull_request:

concurrency:
  group: plugin-linting-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: yarn

      - name: Yarn install
        run: yarn install

      - name: Set up ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler-cache: true

      - name: ESLint
        if: ${{ always() }}
        run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts

      - name: Prettier
        if: ${{ always() }}
        shell: bash
        run: |
          yarn prettier -v
          if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
            yarn prettier --list-different "assets/**/*.{scss,js,es6}"
          fi
          if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
            yarn prettier --list-different "test/**/*.{js,es6}"
          fi

      - name: Ember template lint
        if: ${{ always() }}
        run: yarn ember-template-lint assets/javascripts

      - name: Rubocop
        if: ${{ always() }}
        run: bundle exec rubocop .<commit_msg>DEV: Update CI workflows (#128)<commit_after>name: Linting

on:
  push:
    branches:
      - main
  pull_request:

concurrency:
  group: plugin-linting-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: yarn

      - name: Yarn install
        run: yarn install

      - name: Set up ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler-cache: true

      - name: ESLint
        if: ${{ always() }}
        run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts

      - name: Prettier
        if: ${{ always() }}
        shell: bash
        run: |
          yarn prettier -v
          if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
            yarn prettier --list-different "assets/**/*.{scss,js,es6}"
          fi
          if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
            yarn prettier --list-different "test/**/*.{js,es6}"
          fi

      - name: Ember template lint
        if: ${{ always() }}
        run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts

      - name: Rubocop
        if: ${{ always() }}
        run: bundle exec rubocop .
{'fraction_non_alphanumeric': 0.15384615384615385, 'fraction_numerical': 0.012711864406779662, 'mean_word_length': 1.6873905429071805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2347024', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1036, 'n_words': 279}