This project has moved. For the latest updates, please go here.

auto-generated files

May 17, 2014 at 9:39 PM
Is there any possibility to prevent automatic addition of the header to <auto-generated> files?
These come with such a wide variety of extensions that it is almost impossible to exclude them using the standard .licenseheader syntax.

Many thanks for an excellent developer tool (saves having to go through all those template files and adding a header manually. :) )
May 22, 2014 at 11:54 AM
Hm, definitely useful, but how would the LHM tool recognize whether a file was auto-generated, if not by its extension?
May 22, 2014 at 7:34 PM
I am now retired and so do not have exposure to as great a variety of auto-generated files as some of your users. Nonetheless, most that I can remember, or still encounter, contain phrases such as "<autogenerated>" or " this file was generated by a tool" (I don't think that the last one is referring to the coder :-) ).

In my ignorance I therefore thought that it might be implemented in a similar way to the existing "Only delete headers containing the following text" feature. With a couple of the more common, as above, examples and an editable list to allow for specialised situations.

Would that I had the skills to attempt it myself.
May 23, 2014 at 8:22 AM
Henry, yes, the <autogenerated> marker in the header comment block of the file could work for some generated files. I think the most comprenensive way to tackle this would be to allow the definition of a blacklist of text in the header comment block of files as well as the option to define extension that will be excluded.

What I don't know is how/if ASP.NET MVC marks it's T4 generated files. ATM I can't say if we're able to check the item-metadata of the project file during analysis. If we can, we could test for the presence of <AutoGen>true</AutoGen> for a specific file.

Lastly, it would be necesarry to opt in/opt out of this depending on your license requirements. E.G. it might be required that all your files contain a license header. This would certainly be an interesting contribution to get :)

Best regards, Michael