| @@ -1133,33 +1133,36 @@ func (cv *VartypeCheck) PrefixPathname() | | | @@ -1133,33 +1133,36 @@ func (cv *VartypeCheck) PrefixPathname() |
1133 | | | 1133 | |
1134 | if m, manSubdir := match1(cv.Value, `^man/(.+)`); m { | | 1134 | if m, manSubdir := match1(cv.Value, `^man/(.+)`); m { |
1135 | from := "${PKGMANDIR}/" + manSubdir | | 1135 | from := "${PKGMANDIR}/" + manSubdir |
1136 | fix := cv.Autofix() | | 1136 | fix := cv.Autofix() |
1137 | fix.Warnf("Please use %q instead of %q.", from, cv.Value) | | 1137 | fix.Warnf("Please use %q instead of %q.", from, cv.Value) |
1138 | fix.Replace(cv.Value, from) | | 1138 | fix.Replace(cv.Value, from) |
1139 | fix.Apply() | | 1139 | fix.Apply() |
1140 | } | | 1140 | } |
1141 | } | | 1141 | } |
1142 | | | 1142 | |
1143 | func (cv *VartypeCheck) PythonDependency() { | | 1143 | func (cv *VartypeCheck) PythonDependency() { |
1144 | if cv.Value != cv.ValueNoVar { | | 1144 | if cv.Value != cv.ValueNoVar { |
1145 | cv.Warnf("Python dependencies should not contain variables.") | | 1145 | cv.Warnf("Python dependencies should not contain variables.") |
1146 | } else if !matches(cv.ValueNoVar, `^[+\-.0-9A-Z_a-z]+(?:|:link|:build)$`) { | | 1146 | } else if !matches(cv.ValueNoVar, `^[+\-.0-9A-Z_a-z]+(?:|:link|:build|:test|:tool)$`) { |
1147 | cv.Warnf("Invalid Python dependency %q.", cv.Value) | | 1147 | cv.Warnf("Invalid Python dependency %q.", cv.Value) |
1148 | cv.Explain( | | 1148 | cv.Explain( |
1149 | "Python dependencies must be an identifier for a package, as", | | 1149 | "Python dependencies must be an identifier for a package, as", |
1150 | "specified in lang/python/versioned_dependencies.mk.", | | 1150 | "specified in lang/python/versioned_dependencies.mk.", |
1151 | "This identifier may be followed by :build for a build-time only", | | 1151 | "This identifier may be followed by:", |
1152 | "dependency, or by :link for a run-time only dependency.") | | 1152 | "\t:tool for a tool dependency,", |
| | | 1153 | "\t:build for a build-time only dependency,", |
| | | 1154 | "\t:test for a test-only dependency,", |
| | | 1155 | "\t:link for a run-time dependency.") |
1153 | } | | 1156 | } |
1154 | } | | 1157 | } |
1155 | | | 1158 | |
1156 | func (cv *VartypeCheck) RPkgName() { | | 1159 | func (cv *VartypeCheck) RPkgName() { |
1157 | if cv.Op == opUseMatch { | | 1160 | if cv.Op == opUseMatch { |
1158 | return | | 1161 | return |
1159 | } | | 1162 | } |
1160 | | | 1163 | |
1161 | if cv.Value != cv.ValueNoVar { | | 1164 | if cv.Value != cv.ValueNoVar { |
1162 | cv.Warnf("The R package name should not contain variables.") | | 1165 | cv.Warnf("The R package name should not contain variables.") |
1163 | return | | 1166 | return |
1164 | } | | 1167 | } |
1165 | | | 1168 | |