From 8c11d4d6ed32ce8c32a16ac5d56ba9a05ee32400 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Mon, 25 Jul 2022 14:25:13 -0300 Subject: [PATCH] DEV: Enable ruby Syntax Tree format --- .github/workflows/plugin-linting.yml | 4 ++ Gemfile | 7 ++-- Gemfile.lock | 55 ++++++++++++++++++---------- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml index 6161090..e2d2724 100644 --- a/.github/workflows/plugin-linting.yml +++ b/.github/workflows/plugin-linting.yml @@ -55,3 +55,7 @@ jobs: - name: Rubocop if: ${{ always() }} run: bundle exec rubocop . + + - name: Syntax Tree + if: ${{ always() }} + run: RUBYOPT="-W0" bundle exec stree check --print-width=100 --plugins=plugin/trailing_comma **/*.rb Gemfile **/*.rake diff --git a/Gemfile b/Gemfile index 7da32ec..e54add5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ # frozen_string_literal: true -source 'https://rubygems.org' +source "https://rubygems.org" group :development do - gem 'rubocop-discourse' -end + gem "rubocop-discourse", git: "https://github.com/discourse/rubocop-discourse/", branch: "stree" + gem "syntax_tree" +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 39bc1bc..bf56f57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,34 +1,49 @@ +GIT + remote: https://github.com/discourse/rubocop-discourse/ + revision: 8afca6460a423a11a2e0bf1f7051b18dd9a7231b + branch: stree + specs: + rubocop-discourse (2.5.0) + rubocop (>= 1.1.0) + rubocop-rspec (>= 2.0.0) + GEM remote: https://rubygems.org/ specs: - ast (2.4.0) - jaro_winkler (1.5.4) - parallel (1.19.1) - parser (2.7.1.2) - ast (~> 2.4.0) - rainbow (3.0.0) + ast (2.4.2) + json (2.6.2) + parallel (1.22.1) + parser (3.1.2.0) + ast (~> 2.4.1) + prettier_print (0.1.0) + rainbow (3.1.1) + regexp_parser (2.5.0) rexml (3.2.5) - rubocop (0.82.0) - jaro_winkler (~> 1.5.1) + rubocop (1.32.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 2.7.0.1) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) - rexml + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.19.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-discourse (2.1.2) - rubocop (>= 0.69.0) - rubocop-rspec (>= 1.39.0) - rubocop-rspec (1.39.0) - rubocop (>= 0.68.1) - ruby-progressbar (1.10.1) - unicode-display_width (1.7.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.19.1) + parser (>= 3.1.1.0) + rubocop-rspec (2.12.1) + rubocop (~> 1.31) + ruby-progressbar (1.11.0) + syntax_tree (3.2.1) + prettier_print + unicode-display_width (2.2.0) PLATFORMS ruby DEPENDENCIES - rubocop-discourse + rubocop-discourse! + syntax_tree BUNDLED WITH - 2.1.4 + 2.2.22