Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reviewdog outputs raw format instead of code suggestion #56

Closed
yaozhang09 opened this issue Jan 12, 2023 · 1 comment
Closed

reviewdog outputs raw format instead of code suggestion #56

yaozhang09 opened this issue Jan 12, 2023 · 1 comment

Comments

@yaozhang09
Copy link

yaozhang09 commented Jan 12, 2023

When running sqlfluff fix on changes that end up being more than a few lines of sql, instead of a code suggestion on pr review it gets outputted in raw format. Wondering why that's the case or if there is something with my workflow implementation?

small change:
Screenshot 2023-01-12 at 3 12 33 PM

change that is over 20 lines long:
Screenshot 2023-01-12 at 3 21 11 PM

.sqlfluff config:

dialect = bigquery
templater = dbt
rules = core
exclude_rules = L008, L032, L031, L040

[sqlfluff:templater:dbt]
project_dir = .

[sqlfluff:templater:jinja]
apply_dbt_builtins = True

[sqlfluff:rules]
capitalisation_policy = consistent
extended_capitalisation_policy = consistent

[sqlfluff:rules:L016]
max_line_length = 200

workflow:

steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 1

      - uses: yu-iskw/action-sqlfluff@v3.5.0
        id: fix-sql
        env: 
          DBT_PROFILES_DIR: '${{ github.workspace }}/dbt'
        with: 
          github_token: ${{ secrets.GITHUB_TOKEN }}
          working-directory: '${{ github.workspace }}/dbt'
          level: 'warning'
          reporter: github-pr-review
          filter_mode: 'added'
          reviewdog_version: '0.14.1'
          sqlfluff_version: '1.4.5'
          sqlfluff_command: 'fix'
          paths:  "${{ github.workspace }}/dbt/models"
          config: "${{ github.workspace }}/dbt/.sqlfluff"
          extra_requirements_txt: "${{ github.workspace }}/dbt/sqlfluff_requirements.txt"
      
      - name: 'Show outputs (Optional)'
        shell: bash
        run: |
          echo '${{ steps.fix-sql.outputs.sqlfluff-results }}' | jq -r '.'
          echo '${{ steps.fix-sql.outputs.sqlfluff-results-rdjson }}' | jq -r '.'
@lachupacabra
Copy link

We are still seeing this issue. Any reason this thread was closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants