question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validate gradlew scripts

See original GitHub issue

Also validate gradlew and gradlew.bat scripts. These are not blobs so it is harder to overlook something, but I think these should be checked too.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vlsicommented, Mar 17, 2021

As said above, I wonder what the signal/noise ratio would be given the line endings potential problem and the fact it is intended that people modify it if they need to e.g. change the Gradle client VM options.

  1. The verifier could normalize line endings (gradlew to LF and gradlew.bat to CRLF) before doing the comparison (it might make sense to normalize to LF always).

  2. Frankly speaking, I have not seen a case when users customized gradlew scripts. I assume an opt-out would really help here: the extra skip-gradlew-scripts-validation: true would make it explicit that the files are augmented on purpose.

1reaction
robstollcommented, Apr 25, 2020

I would vote for an opt-out of the additional check (in the sense of security first).

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Importance of Validating the Gradle Wrapper | JD Porterfield
gradlew - A shell script used for running the build on Linux and Mac (as opposed to using a specific gradle version command...
Read more >
Command-Line Interface - Gradle User Manual
The built-in gradle wrapper task generates a script, gradlew , that invokes a declared version of Gradle, downloading it beforehand if necessary. $...
Read more >
Gradle check task essentials - Tom Gregory
Check is a task you run from the command line using ./gradlew check in Linux and Mac or gradlew check in Windows.
Read more >
Run Your Gradle Build Anywhere with the Gradle Wrapper
Then, we can check if the version is duly updated by running the ./gradlew --version command. You can also change the version number...
Read more >
Check if gradle tests pass in shell script - Stack Overflow
Why not just checking the exit status of ./gradlew ? If the script passes, the exit status will be 0, otherwise it will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found