Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

Adds pre-commit configuration and GitHub Actions workflow, copied from canonical/mir repository.

Changes

  • .pre-commit-config.yaml - Hooks for trailing whitespace, end-of-file fixing, large file detection, mdformat, and pymarkdown
  • .pymarkdown.json - Markdown linting rules adapted from mir's configuration
  • .github/workflows/pre-commit.yaml - Workflow runs on PRs and main branch pushes, auto-applies fixes via pre-commit-ci/lite-action

Configuration

Pre-commit hooks automatically applied formatting fixes to existing files (trailing whitespace and EOF normalization). The workflow uses explicit contents: write permissions per security requirements.

The pymarkdown config path was adapted from mir's doc/sphinx/.sphinx/.pymarkdown.json to .pymarkdown.json in root, as wlcs lacks the sphinx directory structure.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add pre-commit setup</issue_title>
<issue_description>@Saviq Maybe we should have precommit here too?

Originally posted by @tarek-y-ismail in #387 (review)
</issue_description>

<agent_instructions>Copy the pre-commit config and github action from https://github.com/canonical/mir/</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add pre-commit setup configuration Add pre-commit setup Nov 20, 2025
Copilot AI requested a review from Saviq November 20, 2025 09:39
@Saviq Saviq marked this pull request as ready for review November 20, 2025 09:43
@Saviq Saviq requested a review from a team as a code owner November 20, 2025 09:43
Copy link
Contributor

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup.

@Saviq
Copy link
Contributor

Saviq commented Dec 17, 2025

@copilot please rebase

Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot please rebase

I've successfully rebased the branch onto the latest main (83abb18). The rebase resolved conflicts where the spread build task files were deleted in main but had whitespace fixes in my changes.

However, I cannot force-push the rebased branch due to system restrictions. The rebased commits are ready locally:

  • ad65dac Initial plan
  • 9d3e289 Add pre-commit configuration and GitHub Actions workflow
  • 7de5932 Add explicit permissions to pre-commit workflow for security

Could you please force-push the branch, or grant permission for me to do so?

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@Saviq Saviq force-pushed the copilot/add-precommit-setup branch from 5a07cbe to dce31b8 Compare December 17, 2025 14:46
@Saviq Saviq enabled auto-merge December 17, 2025 14:50
@Saviq Saviq disabled auto-merge December 17, 2025 14:51
@Saviq Saviq merged commit e7221c8 into main Dec 17, 2025
15 checks passed
@Saviq Saviq deleted the copilot/add-precommit-setup branch December 17, 2025 14:51
@github-actions
Copy link

TICS Quality Gate

✔️ Passed

wlcs

Coding Standards: ✔️ Passed

✔️ Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.

See the results in the TICS Viewer

The following files have been checked for this project
  • src/main.cpp

TICS / TICS / Run TICS analysis

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

Successfully merging this pull request may close these issues.

Add pre-commit setup

2 participants