Ensures the given text is nowhere in the code base
You don't want any debug code to slip into production.
This can be used to check if there is any debug code still in your codebase or if you have things like
// TO DOor similar.
|Supported platforms||ios, android, mac|
ensure_no_debug_code(text: "// TODO")
ensure_no_debug_code(text: "Log.v", extension: "java")
ensure_no_debug_code(text: "NSLog", path: "./lib", extension: "m")
ensure_no_debug_code(text: "(^#define DEBUG|NSLog)", path: "./lib", extension: "m")
ensure_no_debug_code(text: "<<<<<<", extensions: ["m", "swift", "java"])
||The text that must not be in the code base|
||The directory containing all the source files||
||The extension that should be searched for|
||An array of file extensions that should be searched for|
||Exclude a certain pattern from the search|
||An array of dirs that should not be included in the search|
* = default value is dependent on the user's system
To show the documentation in your terminal, run
fastlane action ensure_no_debug_code
It is recommended to add the above action into your
Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal
fastlane run ensure_no_debug_code
To pass parameters, make use of the
: symbol, for example
fastlane run ensure_no_debug_code parameter1:"value1" parameter2:"value2"
It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g.
param:"1,2,3"). Hashes are not currently supported.
It is recommended to add all fastlane actions you use to your
This action, just like the rest of fastlane, is fully open source, view the source code on GitHub