🛒 More SmartTasks
👍 Tested to be working with R81.20+
SmartTask to verify if a change includes non-ASCII characters.
Script code
Copy the code below into a new script 'Task_CheckNonASCII' of your SmartConsole script repository.
test `cat $1|LC_ALL=C grep -q '[^ -~]';echo $?` -eq 0 && echo '{"result":"failure","message":"Change includes forbidden non-ASCII characters."}' || echo '{"result":"success"}'
SmartTask
Create a new SmartTask in SmartConsole > Manage & Settings > SmartTasks and install policy to activate the new task.
| Name |
Description |
Trigger |
Action |
Enabled |
| Detect Non-ASCII Characters |
Check for Non-ASCII characters in changes. |
Before Publish |
Run Script |
✔️ |