iRules Style Guide
This article (formatted here in collaboration with and from the notes of F5er Jim_Deucker) features an opinionated way to write iRules, which is an extension to the Tcl language. Tcl has its own st...
Updated May 20, 2024
Version 4.0JRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.Jim_Deucker
Employee
Author of vscode extensions for iRules, iApps and Tcl, https://github.com/bitwisecookJRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.Juergen_Mang
MVP
Dec 23, 2022Great article. Most things are cosmetical, but some realy important things are mentioned also. I will highlight:
- K15650046: Tcl code injection security exposure
- Always wrap expressions in curly brackets to avoid double expansion
- iRule priorities
- the static:: behavior
I see in in the wild often scripts that violates against these best practices.
What also could be mentioned is: switch cases do not need any "return" or "break" statements, too not fall through. I saw "return" many times errorneous used in this context.