all files should have standard header with standard keywords
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MVHub |
Fix Committed
|
Medium
|
Ferhat Elmas |
Bug Description
Almost every text file in version control should have a header like:
# LICENSE: GNU Affero General Public License v3
# COPYRIGHT: Community Software Lab
# CONTACT: <email address hidden>
# PROJECT: https:/
# PURPOSE: This file exists to demo a header
# It should be possible for a PURPOSE
# line to span multiple lines.
This header should be in the first 10 lines of the file. (new 2010-07-24 )
Files with complete POD should maybe not get this header.
Other or no comment styles should be possible. Like:
<!--
- -->
A test should be added:
This test should fail if any (?) file lacks the header w/ the needed keywords.
lib-mvhub/
For a routine that checks to see if a string is found in a file see:
the routine is found in:
If this routine is useful, remove the _ and export it.
see also:
app-mvhub/
...which may have useful logic.
To write this test, you'll
have to get a list of files in the project
---see the routines in TestHelper.pm
exclude some files (binary)
check each file for the presence of all required header comments.
fail the test if they aren't there.
man file
perldoc TestHelper
It is probably also worth writing a script to automatically add header to files that are missing them as it will be tedious to do this by hand.
Related branches
- Dan MacNeil: Approve
-
Diff: 445 lines (+418/-1)4 files modifiedapp-mvhub/project-tools/bin/mv_add_doc_header (+190/-0)
app-mvhub/t/header_doc_existence.t (+114/-0)
app-mvhub/t/required_comments_present.t (+1/-1)
xt/header_doc_meaning.t (+113/-0)
description: | updated |
Changed in mvhub: | |
assignee: | troylamonte (troylamonte) → hsanagavarapu (himabindu-sanagavarapu) |
importance: | Low → Medium |
description: | updated |
description: | updated |
Changed in mvhub: | |
assignee: | hsanagavarapu (himabindu-sanagavarapu) → Roger Wieand (roger-wieand) |
Changed in mvhub: | |
status: | Confirmed → In Progress |
assignee: | Roger Wieand (roger-wieand) → Ferhat Elmas (felmas) |
Changed in mvhub: | |
status: | In Progress → Fix Committed |
hey Dan Whats up, this is Troy. We made it to providence, RI, we are now in
the process of getting a place and all our benefits switched to this area.
Looking forward to working with you again. will write as soon as we are
settled.
On Mon, Jul 5, 2010 at 4:27 PM, Dan MacNeil <email address hidden> wrote:
> ** Description changed: t/keywords_ found.t t/header_ doc.t doc.bazaar. canonical. com/plugins/ en/keywords- plugin. html t/lib/TestHelpe r.pm may have useful routines. enigmail. mozdev. org Utils:: Setup:: _string_ already_ in_file( ) w0cIACgkQLzI3mE TyffzcIgCdHYPxG oeMM25Y4UcBZ6py 0iv3 IysE/E9J9J4TDTI xC lib/MVHub/ Utils/Setup. pm t/required_ comments_ present. t /bugs.launchpad .net/bugs/ 519126 t/header_ doc.t t/lib/TestHelpe r.pm may have useful routines.
>
> - -----BEGIN PGP SIGNED MESSAGE-----
> - Hash: SHA1
> -
> - affects mvhub
> - assignee troylamonte
> - importance low
> - status confirmed
> - tag refactor
> - done
> -
> Almost every text file in version control should have a header like:
>
> # LICENSE: GNU Affero General Public License v3
> # COPYRIGHT: Community Software Lab
> # CONTACT: <email address hidden>
>
> # PURPOSE: This file exists to demo a header
> # It should be possible for a PURPOSE
> # line to span multiple lines.
>
> Files with complete POD should maybe not get this header.
>
> Other or no comment styles should be possible.
>
> <!--
>
> - -->
>
> A test should be added:
>
> - app-mvhub/
> + app-mvhub/
>
> - This test should fail if a file lacks the header w/ the needed keywords.
> -
> - For ugly code that tests for similar things:
> -
> - http://
> + This test should fail if any (?) file lacks the header w/ the needed
> + keywords.
>
> lib-mvhub/
>
> + For a routine that checks to see if a string is found in a file see:
>
> - -----BEGIN PGP SIGNATURE-----
> - Version: GnuPG v1.4.9 (GNU/Linux)
> - Comment: Using GnuPG with Mozilla - http://
> + MVHub::
>
> - iEYEARECAAYFAkt
> - PpUAn376eI2WHSt
> - =osuJ
> - -----END PGP SIGNATURE-----
> + the routine is found in:
> +
> + lib-mvhub/
> +
> + If this routine is useful, remove the _ and export it.
> +
> + see also:
> +
> + app-mvhub/
> +
> + ...which may have useful logic.
> +
> + It is probably also worth writing a script to automatically add header
> + to files that are missing it.
>
> --
> all files should have standard header with standard keywords
> https:/
> You received this bug notification because you are a bug assignee.
>
> Status in MVHub, a directory of social services: Confirmed
>
> Bug description:
> Almost every text file in version control should have a header like:
>
> # LICENSE: GNU Affero General Public License v3
> # COPYRIGHT: Community Software Lab
> # CONTACT: <email address hidden>
>
> # PURPOSE: This file exists to demo a header
> # It should be possible for a PURPOSE
> # line to span multiple lines.
>
> Files with complete POD should maybe not get this header.
>
> Other or no comment styles should be possible.
>
> <!--
>
> - -->
>
> A test should be added:
>
> app-mvhub/
>
> This test should fail if any (?) file lacks the header w/ the needed
> keywords.
>
> lib-mvhub/
>
> For a routin...