An example:
#Line 775: string concatenation should be formatted with a space separating the operators (dot .) and non-quote terms
$errors['state'] = t('Illegal value for State. It should have been set for you. Contact the site administrator.');
If I take out the "."s then it passes just fine.
- Mick
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | tsi__module_template.zip | 15.65 KB | gerkestam |
Comments
Comment #1
stella commentedI can't reproduce this issue, and I tested using the same line as you pasted in above.
Comment #2
douggreen commentedI temporarily added a test for this and couldn't reproduce either. I'm inclined to close the issue because Stella and I could not reproduce it and micklweiss hasn't responded. However, while writing other tests, I noticed a string concatenation rule triggering in an odd place. If you're interested in helping, please run the coder style simpletests and look a the two failures.
Comment #3
gerkestam commentedI have the same issue as described by micklweiss. I used the coder module version 6.x-2.0-beta1.
Herewith I am sending the module in error.
Comment #4
fgmStill there in 6.x-2.x-dev, coder.style.inc version 1.16.2.18.2.11.
Minimal sample to reproduce:
And sure enough:
Line xxx: string concatenation should be formatted with a space separating the operators (dot .) and non-quote terms $foo = $bar .'/baz.js';The problem is the regex being used:
([^\(\'\"\s0-9]\.|\.[^\)\'\"\=\s0-9]). In such a case, it finds a false positive on the dot within the quotes, and returns a match on the next letter (in this case the "j").Comment #5
stella commentedI put the example code you provided and put it in one of my modules and I don't get that error for either D6 or D7. Probably a duplicate of #314268: Coder concatenates strings in odd ways during parsing