i just tried coder on a new module (on my server, not the automated coder site) and got recommendations for code cleanup. works well.
but i was searching for something downloadable like a set of patched files or even a .patch file to apply. does this exist? or do i have to do all changes manually.
would use the patch from the auto site, but i wanted the complete coder review, not the normal or basic one).
(note finally, not talking about upgrade, just review)

Comments

solotandem’s picture

Coder Review does not make any changes to your files. It simply notes any possible concerns.

If part of what you are after is coding style, then use the "auto site" and select the "coding standards" upgrade. It will provide you both a patch file and the changed files.

docwilmot’s picture

thanks
the reason i downloaded coder rather than use the site was that i suspect, based on the patch it produced, that the site provides only "critical" code recommendations. the module however has options for "minor", "normal", and "critical."
can you confirm what 'severity' of standard that the site provides please? i dont see an option to select a choice.

solotandem’s picture

If you run the site as I indicated in #1, then it does not run Coder Review but simply parses and rewrites your code files with the Grammar Parser. The output from the parser complies with the coding standards.

If you run the upgrade routines (which will invoke Coder Review), then it should have the output set on "normal."

docwilmot’s picture

Category: support » feature

thanks
in that case, a feature request suggestion: for those of us who just want coder review and not currently interested in upgrading to d7, it would be great if the coder review module would provide a patch file rather than (or in addition to) the list of suggestions.

to be clear (i'm never sure people understand what i mean on forums):
i have a new module i just wrote

  • i download/install coder
  • i run coder review on the module i just wrote, selecting minor/normal/critical
  • coder review gives me the usual fieldsets with suggested changes
  • but it also give the option to download a patch file and/or a patched version of my module (just like if i was upgrading)
  • i review the patch and apply/don't apply as fit.
  • done

i wish i could do this, but it is way outside the scope of my abilities.
and thanks for the work so far though.

solotandem’s picture

Reread #1. If no changes are made to your files (which is the case with Coder Review), then there is no patch file to create. Making changes is what the upgrade routines are all about. Again, you could eliminate any coding standards issues by using the "site" referred to above. Your code would be clean and you could see what else Coder Review finds.

docwilmot’s picture

last try then i will give up, as it seems we are not understanding each other.
i'll start with your last sentence: "Your code would be clean and you could see what else Coder Review finds"
so i put my module files through the live site, it gave me a patch/updated file with changes such as indenting the comment tags, adding spaces between dot concatenation, etc. good.
run this freshly updated and patched module through coder review on my on site now, to see what else Coder Review finds, with 'minor' severity selected, and it spits out a bunch more suggestions: i dont have @file here, there are spaces i dont need there etc. my point, is instead of suggesting these remaining changes, couldnt it give me a patch!?

conclusion: if coder.module could produce a patch file for code style reviews instead of only suggesting code style changes, it would be more useful.

thats it. hope you get me this time.
and feel to close this if you dont.
thanks again.

solotandem’s picture

So, by using the upgrade site, at least your files are cleaned up for coding standards.

I get your point that it would be nice if Coder Review produced a patch file, but it was not written to do so. Changing code and finding things that need to change are two different animals. The upgrade module is a better place to start for this; add it to the wish list.

douggreen’s picture

Status: Active » Closed (won't fix)

I wish we could do this and I have ideas for making some changes, but ... I am looking for ways of combining solutions, but without code, I am closing this requst. See #1745068: Coder Review Drupal 8.x Battleplan

douggreen’s picture

Component: Coder Review » Upgrade Site
Status: Closed (won't fix) » Closed (duplicate)