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

CommentFileSizeAuthor
#3 tsi__module_template.zip15.65 KBgerkestam

Comments

stella’s picture

I can't reproduce this issue, and I tested using the same line as you pasted in above.

douggreen’s picture

Status: Active » Postponed (maintainer needs more info)

I 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.

gerkestam’s picture

Version: 6.x-1.x-dev » 6.x-2.0-beta1
StatusFileSize
new15.65 KB

I 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.

fgm’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Active

Still there in 6.x-2.x-dev, coder.style.inc version 1.16.2.18.2.11.

Minimal sample to reproduce:

$foo = $bar .'/baz.js'

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").

stella’s picture

Status: Active » Closed (duplicate)

I 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