parkhojeong commented on code in PR #66356:
URL: https://github.com/apache/airflow/pull/66356#discussion_r3182300339


##########
.pre-commit-config.yaml:
##########
@@ -400,6 +400,34 @@ repos:
         files: ^\.github/workflows/.*$|^\.github/actions/.*$
         require_serial: true
         entry: zizmor
+  - repo: https://github.com/lycheeverse/lychee
+    rev: e85aaf5524b2f808e63bae55e594c843220f10f2  # frozen: lychee-v0.24.2
+    hooks:
+      - id: lychee
+        name: Check internal Markdown links with lychee (offline mode)
+        description: >-
+          Validate intra-repo links in Markdown files (relative paths, anchors)
+          without making any HTTP requests. Auto-generated client docs are
+          excluded because they are regenerated from OpenAPI specs.
+        types: [markdown]
+        args:
+          # Pin the lychee binary version explicitly. Airflow follows the
+          # SHA-pinning convention for `rev`, but the lychee pre-commit
+          # script needs a version tag — passing it via this arg keeps both
+          # happy. Update both the `rev` SHA above and this version string
+          # together when bumping.
+          - LYCHEE_VERSION=0.24.2
+          - --offline
+          - --no-progress
+          - --root-dir
+          - .

Review Comment:
   ```suggestion
             - --root-dir
             - .
             - --include-fragments
   ```
   
     Adding `--include-fragments` makes lychee report broken Markdown anchor 
fragments. For example, 
`airflow-core/src/airflow/ui/public/i18n/README.md#removing-or-replacing-ownership`
 points to an anchor that does not exist in that README.
   
   <img width="1360" height="345" alt="Image" 
src="https://github.com/user-attachments/assets/f4b39530-a319-4ae6-8306-62d617b7b25e";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to