| 49 | #define NW "[^ \t\"']" /* non-whitespace, non-quote */ |
| 50 | |
| 51 | static void compile_patterns(void) { |
| 52 | if (patterns_compiled) { |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | cbm_regcomp(&dockerfile_re, "^(ENV|ARG)[[:space:]]+(" W "+)[= ](.*)", CBM_REG_EXTENDED); |
| 57 | cbm_regcomp(&yaml_kv_re, "(" W "+):[[:space:]]*[\"']?(https?://" NW "+)", CBM_REG_EXTENDED); |
| 58 | cbm_regcomp(&yaml_setenv_re, "--set-env-vars[[:space:]]+(" W "+)=([^ \t]+)", CBM_REG_EXTENDED); |
| 59 | cbm_regcomp(&terraform_re, "(default|value)[[:space:]]*=[[:space:]]*\"(https?://[^\"]+)\"", |
| 60 | CBM_REG_EXTENDED); |
| 61 | cbm_regcomp(&shell_re, "(export[[:space:]]+)?(" W "+)=[\"']?(https?://" NW "+)", |
| 62 | CBM_REG_EXTENDED); |
| 63 | cbm_regcomp(&envfile_re, "^(" W "+)=(https?://[^ \t]+)", CBM_REG_EXTENDED); |
| 64 | cbm_regcomp(&toml_re, "(" W "+)[[:space:]]*=[[:space:]]*\"(https?://[^\"]+)\"", |
| 65 | CBM_REG_EXTENDED); |
| 66 | cbm_regcomp(&properties_re, "(" W "+)[[:space:]]*=[[:space:]]*(https?://[^ \t]+)", |
| 67 | CBM_REG_EXTENDED); |
| 68 | |
| 69 | patterns_compiled = SKIP_ONE; |
| 70 | } |
| 71 | |
| 72 | #undef W |
| 73 | #undef NW |
no test coverage detected