microsoft / microsoft/qlib

auto lint fix in CI

Open
#2,060 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
48.7k
Forks
7.7k
PR merge metrics
No merged PRs in 30d

Description

🌟 Feature Description

Could we add a CI job for automated lint fixing?

Motivation

This would enable automatic lint checking and fixing within our CI pipeline, saving manual effort and freeing up developers' time.

sample code:

name: Lint Fix

on:
  pull_request:
    branches:
      - main

jobs:

  lint-fix:
    name: Fix linting issues
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write

    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.head_ref }}
          repository: ${{ github.event.pull_request.head.repo.full_name }}
          fetch-depth: 0
          token: ${{ secrets.GITHUB_TOKEN }}

... ...

      - name: run format
        run:
          make format
      # Commit and push changes if any
      - name: Check for changes
        id: git-check
        run: |
          git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT
      - name: Commit and push if there are changes
        if: steps.git-check.outputs.changes == 'true'
        run: |
          git config --local user.email "XXX"
          git config --local user.name "XXX"
          git commit -a -m "🤖 Auto-fix linting issues"
          git push

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the repository's existing CI workflows and the make format entry point first. Define the workflow behavior and permissions, then verify that lint fixes are applied to pull requests and changes are committed and pushed only when formatting changes exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.