Skip to content

Conversation

@Jkhall81
Copy link
Contributor

@Jkhall81 Jkhall81 commented Jan 9, 2026

Summary

This PR addresses an inconsistency in the no-free-form rule where the auto-fix (transformer) failed to recognize tasks using short module names (e.g., file: instead of ansible.builtin.file:).

Changes:

  • Enhanced Detection: Updated the rule to pass the original module name via the MatchError.details property, ensuring the transformer knows exactly which key to target.
  • Improved Transformation: Refactored the transform logic to handle both FQCN and short-name keys, preventing TypeError crashes and partial string remains.
  • Test Coverage: Added regression test cases to rule-no-free-form-fail.yml covering short names with multiple parameters, names without task descriptions, and collection-based modules.
  • Schema Updates: Synchronized internal JSON schemas and store manifests via pre-commit hooks.

Fixes #4750

@Jkhall81 Jkhall81 force-pushed the fix/4750-lint-autofix-inconsistency branch from b4c1ece to 3f54c36 Compare January 9, 2026 16:33
@github-actions github-actions bot added fix and removed fix labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

no-free-form Rule Only Auto-fixes FQCN, Not Short Module Name

1 participant