Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
OTRSCodePolicy
OTRS code quality checks. Version 1.0.7 Edition
Build Date:
2014-09-13
Table of Contents
Preface ................................................................................................................................ iii
1. Feature List ..................................................................................................................... 1
1. How it can be used ................................................................................................. 1
2. What's cool about it ................................................................................................ 1
3. How to run it to validate your code ........................................................................ 1
4. How to configure it .................................................................................................. 1
2. System Requirements ..................................................................................................... 2
1. Framework ............................................................................................................... 2
2. Packages .................................................................................................................. 2
3. Operating System .................................................................................................... 2
4. Third Party Software ................................................................................................ 2
3. Installation ....................................................................................................................... 3
1. Admin Interface ....................................................................................................... 3
2. Command Line ........................................................................................................ 3
4. Configuration ................................................................................................................... 4
5. Filelist .............................................................................................................................. 5
6. ChangeLog .................................................................................................................... 10
7. Contacts ........................................................................................................................ 11
1. OTRS AG ................................................................................................................ 11
ii
Preface
OTRSCodePolicy is a general code quality checker that can also make changes to the code.
You can use it to check your code against the OTRS code style guide.
iii
Chapter1.Feature List
1.How it can be used
manually (see below)
as a pre commit hook that validates your local changes
as a pre receive filter that checks what you push to git.otrs.org
as a unit test that you can run locally and also runs on the UT servers (for the framework)
4.How to configure it
Configuration is done in TidyAll/tidyallrc. This file contains only directory-level configuration, no exceptions for single customized files or modules.
If you need to make an exception in a file for a certain filter, you can use this syntax:
nofilter(Name::Of::Filter).
Example Perl:
## nofilter(TidyAll::Plugin::OTRS::Perl::ISA)
Example SOPM:
<!-- nofilter(TidyAll::Plugin::OTRS::SOPM::DocumentationPresent) -->
Some of the checks are implemented as Perl::Critic policies. To disable these individually,
you can place "## no critic" marks as it is usual for Perl::Critic.
Chapter2.System Requirements
1.Framework
The following OTRS framework is required:
4.0.x
3.3.x
3.2.x
3.1.x
2.Packages
The following packages are required:
None
3.Operating System
This package requires one of the following operating systems:
None
Chapter3.Installation
The following instructions explain how to install the package.
1.Admin Interface
Please use the following URL to install the package utilizing the admin interface (please note
that you need to be in the admin group).
http://localhost/otrs/index.pl?Action=AdminPackageManager
2.Command Line
Whenever you cannot use the Admin Interface for whatever reason, you may use the following command line tool ("bin/otrs.PackageManager.pl") instead.
shell> bin/otrs.PackageManager.pl
-a install -p /path/to/OTRSCodePolicy-1.0.7.opm
Chapter4.Configuration
This package does not need to be configured.
Chapter5.Filelist
This list shows all included files and the referring permissions.
(755) bin/otrs.CodePolicy.pl
(644) Kernel/cpan-lib/Pod/Strip.pm
(644) Kernel/cpan-lib/Locale/PO.pm
(644) Kernel/TidyAll/OTRS.pm
(644) Kernel/TidyAll/OTRS/Git/PreCommit.pm
(644) Kernel/TidyAll/OTRS/Git/PreReceive.pm
(644) Kernel/TidyAll/Plugin/OTRS/Base.pm
(644) Kernel/TidyAll/Plugin/OTRS/Common/CustomizationMarkers.pm
(644) Kernel/TidyAll/Plugin/OTRS/Common/HeaderlineFilename.pm
(644) Kernel/TidyAll/Plugin/OTRS/Common/RemoveCVSIDs.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/Baselink.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/CGIHandle.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/Format.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/LQData.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/Select.pm
(644) Kernel/TidyAll/Plugin/OTRS/DTL/UniqueBlock.pm
(644) Kernel/TidyAll/Plugin/OTRS/JavaScript/DebugCode.pm
(644) Kernel/TidyAll/Plugin/OTRS/Legal/AGPLValidator.pm
(644) Kernel/TidyAll/Plugin/OTRS/Legal/ReplaceCopyright.pm
(644) Kernel/TidyAll/Plugin/OTRS/Legal/SOPMLicense.pm
(644) Kernel/TidyAll/Plugin/OTRS/Migrations/3_4/FontAwesome.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/ProhibitLowPrecendeceOps.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/ProhibitSmartMatchOperator.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/ProhibitOpen.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/ProhibitUnless.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/RequireCamelCase.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/RequireLabels.pm
5
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/RequireParensWithMethods.pm
(644)
Kernel/TidyAll/Plugin/OTRS/Perl/Critic/Policy/OTRS/
RequireTrueReturnValueForModules.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Critic/PolicyOTRS.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/CacheNew.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/DBObject.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/DieExit.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Dumper.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ForeachToFor.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ForMy.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Goto.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ISA.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/LayoutObject.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ModuleFormat.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ObjectDependencies.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ObjectNameSpace.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ParamObject.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/PerlCritic.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/PerlTidy.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/PodChecker.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/PodNewDoc.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/PodSpelling.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Print.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Require.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/ScriptFormat.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/SortKeys.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/SubDeclaration.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/SyntaxCheck.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/Time.pm
(644) Kernel/TidyAll/Plugin/OTRS/Perl/TranslationEncoding.pm
6
(644) Kernel/TidyAll/Plugin/OTRS/Perl/UseWarnings.pm
(644) Kernel/TidyAll/Plugin/OTRS/PO/Lint.pm
(644) Kernel/TidyAll/Plugin/OTRS/PO/msgfmt.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/CodeTags.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/DocumentationPresent.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/FileList.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/FileRights.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/Name.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/PackageRequired.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/RequiredElements.pm
(644) Kernel/TidyAll/Plugin/OTRS/SOPM/XSDValidator.pm
(644) Kernel/TidyAll/Plugin/OTRS/SQL/ColumnTypes.pm
(644) Kernel/TidyAll/Plugin/OTRS/SQL/ReservedWords.pm
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Configuration.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Database.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/calstblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/dbhierx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/dbnotnx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/dbpoolx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/docbook.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/htmltblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_2/xml.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_3/calstblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_3/dbhierx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_3/dbnotnx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_3/dbpoolx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_3/docbook.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/calstblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/dbhierx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/dbnotnx.xsd
7
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/dbpoolx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/docbook.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/htmltblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_4/xml.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/calstblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/dbhierx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/dbnotnx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/dbpoolx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/docbook.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/htmltblx.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/Docbook/4_5/xml.xsd
(644) Kernel/TidyAll/Plugin/OTRS/StaticFiles/XSD/SOPM.xsd
(644) Kernel/TidyAll/Plugin/OTRS/TT/Format.pm
(644) Kernel/TidyAll/Plugin/OTRS/Whitespace/FourSpaces.pm
(644) Kernel/TidyAll/Plugin/OTRS/Whitespace/Tabs.pm
(644) Kernel/TidyAll/Plugin/OTRS/Whitespace/TrailingWhitespace.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/ConfigDescription.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/ConfigSyntax.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/Configuration/XSDValidator.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/Configuration/OutputFilterPre.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/Database/XSDValidator.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/Docbook/XSDValidator.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/Lint.pm
(644) Kernel/TidyAll/Plugin/OTRS/XML/LintWithOurParsers.pm
(644) Kernel/TidyAll/tidyallrc
(755) Kernel/TidyAll/git-hooks/pre-commit.pl
(755) Kernel/TidyAll/git-hooks/pre-receive.pl
(755) Kernel/TidyAll/git-hooks/prepare-commit-msg.pl
(755) scripts/install-git-hooks.pl
(755) scripts/uninstall-git-hooks.pl
8
(644) scripts/test/OTRSCodePolicyPlugins.pm
(644) scripts/test/OTRSCodePolicyPlugins/Common/HeaderlineFilename.t
(644) scripts/test/OTRSCodePolicy.t
(644) scripts/test/OTRSCodePolicyPlugins/Perl/CacheNew.t
(644) scripts/test/OTRSCodePolicyPlugins/Perl/ObjectDependencies.t
(644) scripts/test/OTRSCodePolicyPlugins/PerlCritic/ProhibitOpen.t
(644) scripts/test/OTRSCodePolicyPlugins/PerlCritic/RequireLabels.t
(644) scripts/test/OTRSCodePolicyPlugins/PO/Lint.t
(644) scripts/test/OTRSCodePolicyPlugins/SOPM/CodeTags.t
(644) scripts/test/OTRSCodePolicyPlugins/XML/Configuration/OutputFilterPre.t
Chapter6.ChangeLog
1.0.7 / 2014-09-13 15:48:24
Many bug fixes and improvements.
10
Chapter7.Contacts
People who are involved in this implementation.
1.OTRS AG
Accounting: Rene Bakker <sales@otrs.com>, Phone +49 (0)6172 681988 0
Technical: Manuel Hecht <dev-support@otrs.com>, Phone +49 (0)6172 681988 0
11