Skip to content

Fix conflict-marker lint false positives#68

Merged
danielnovais-tech merged 9 commits intomainfrom
pr-62
Feb 11, 2026
Merged

Fix conflict-marker lint false positives#68
danielnovais-tech merged 9 commits intomainfrom
pr-62

Conversation

@danielnovais-tech
Copy link
Copy Markdown
Owner

Fixes the GitHub Actions Lint workflow "Fail on merge conflict markers" step so it only matches real git conflict marker lines (<<<<<<<, >>>>>>>, |||||||, or a line exactly =======), preventing false positives on documentation separator lines.

This keeps the fail-fast guardrail while avoiding spurious CI failures.

Local verification:

  • Ruff (check) passes
  • Pytest (repo, quick) passes

Copilot AI review requested due to automatic review settings February 11, 2026 23:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the merge-conflict-marker detection in the lint workflow to only flag actual git conflict markers, avoiding false positives on documentation separator lines.

Changes:

  • Tightened conflict marker matching logic in the GitHub Actions lint workflow (prefix markers + exact ======= only).
  • Standardized UTC timestamp usage in the aggregator module via timezone.utc.
  • Added developer tooling configs (.pre-commit-config.yaml, .copilotignore).

Reviewed changes

Copilot reviewed 4 out of 2466 changed files in this pull request and generated 2 comments.

File Description
data_pipeline/anatel/acesso_fixo_aggregator.py Switches UTC time acquisition to timezone.utc for timestamp/report generation.
.pre-commit-config.yaml Adds Ruff + Ruff formatter pre-commit hooks.
.github/workflows/lint.yml Refines conflict-marker detection to avoid false positives (doc separators).
.copilotignore Excludes generated/binary-heavy paths from Copilot context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to +43
# Only flag real git conflict marker lines.
# In particular, don't treat long doc separators like "=====" as conflicts.
START_MARKERS = ("<<<<<<<", ">>>>>>>", "|||||||")
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

START_MARKERS is a bit misleading because it includes >>>>>>> (an end marker) and ||||||| (ancestor marker). Consider renaming to something like CONFLICT_MARKER_PREFIXES (or similar) to better reflect what the tuple contains.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +73
cleaned = stripped.strip()
if cleaned.startswith(START_MARKERS) or cleaned == "=======":
matches.append((str(path), i, cleaned))
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The middle marker \"=======\" is currently a hard-coded string while the other markers are grouped in a constant. To make the intent clearer and avoid scattering marker definitions, consider defining a dedicated constant (or set) for exact-match markers (e.g., EXACT_MARKERS = {\"=======\"}) and using membership checks alongside the prefix tuple.

Copilot uses AI. Check for mistakes.
@danielnovais-tech danielnovais-tech merged commit 4e8e5d5 into main Feb 11, 2026
4 checks passed
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.

2 participants