errose28 opened a new pull request, #516:
URL: https://github.com/apache/ozone-site/pull/516

   ## What changes were proposed in this pull request?
   
   ### Problem
   
   Since [HDDS-14546](https://issues.apache.org/jira/browse/HDDS-14546), CI has 
been passing even with lint errors because pnpm run lint always returns 0. It 
is defined as
   ```
     "lint": "eslint . ; markdownlint . ; yamllint --format=colored ."
   ```
   
   Claude's explanation which is more thorough than mine:
   
   The three tools are chained with ;, not &&. In a shell, a ;-separated 
sequence returns the exit code of the last command only. So:
   
   eslint fails → non-zero code, but ignored; next command runs anyway.
   markdownlint fails → non-zero code, but ignored; next command runs anyway.
   The overall exit code of pnpm run lint = whatever yamllint returns.
   So unless yamllint itself fails, the Run lint step exits 0 and CI stays 
green — even with eslint or markdownlint errors present. markdownlint is 
genuinely running (you'd see its errors in the log output), but its failure is 
swallowed.
   
   ### Fix
   
   Use an `rc` variable to track the aggregate return code of all commands in 
`pnpm run lint`. It starts as 0 and is set to 1 if any commands fail.
   
   All existing lint errors that previously slipped in have been fixed in this 
PR as well.
   
   ## What is the link to the Apache Jira?
   
   HDDS-16010
   
   ## How was this patch tested?
   
   - Local run of `pnpm run lint`:
   - Before this change: exits 0 but prints errors  
   - With the correct command only: exits 1 and prints errors
   - After this whole change with fixes: Exits 0 and prints no errors.
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to