The GNAThub.Plugin class is no longer an abstract class and
GNAThub.Runner & GNAThub.Reporter are two new interfaces exposing
respectively run() and report(). Plugins now have tools execution
done in run() methods, and results collection done in report() methods
(when it make sense for the plugin, ie. coverage plugins only implement
the GNAThub.Reporter interface whereas eg. CodePeer plugin implements
both GNAThub.Runner and GNAThub.Reporter interfaces).
Change-Id: Ic702a98eb3bb02e7f7416b5ff3c998f9b20eaefc
TN: P720-035
Message can now be attached properties. This is first used to specify
whether a CodePeer message is "New" or not.
Change-Id: I1a3d0c1b2b3a97d6601e0e6782b5cc059bf55d0d
TN: P720-036
This plugin stopped working some time ago due to major changes in
GNATprove output. Remove support for it as it will be re-implemented as
part of P701-003.
Change-Id: I7c0b6399243a865c57211b0f2c16573bf5ed63a9
TN: P701-003
TN: N805-021
GNAThub.Tool.clear_references(tool_name) deletes from the database any
entry related to that tool in the following tables:
* entities_messages
* resources_messages
* messages
* rules
* tools
Change-Id: Ib2adfccffc37544b60ea120133d47daef527aebb
TN: O225-028
This new function lists source files on a per project basis. This is
more accurate than using GNAThub.source_dirs() and list the content of
each source directory.
Change-Id: I4cea06be722afa51eea3339070a263225e52f5f6
TN: P310-015
Add a [ --dry-run | -n ] switch to execute GNAThub in dry-run mode.
Dry-run mode skips DB manipulation (initialisation, population, update),
environment setup (project directory hierarchy, ...) and Python script
execution (when using --exec). It also prevents the execution of
plugins.
Change-Id: Ibe160ffc739d7027f9c56940832656d0e8a126a0
TN: P303-043
Extract the test about cross support in two separate test cases in
tests.api-python.project:
* check-cross-api.py
* check-cross-api-override.py
Change-Id: I7a2e3de80f0193553a5879bad55032f6b2bd5abd
TN: O909-050
* add support in GNAThub for --target and --RTS command line
switches.
* add support for Target and Runtime attributes defined in the project
file.
* add tests to cover the new API methods (Project.target &
Project.runtime).
Change-Id: I42a88471598fefec16a7505ad70cd24b08f3dd8b
TN: O909-050
This commit introduces several changes:
* rewrite the docstring of Python scripts to use AdaCore style and
have a consistent documentation notation across projects
* add plug-ins documentation to the generated doc, so that users don't
need to dive into the source files when developing their own
plug-ins
* use a custom style for the HTML documentation (lighter & easier to
read)
Change-Id: Ied42183e866ee552b90af2f4ef1d2410be601ca4
Provide a default implementation to the GNAThub.Plugin.name property:
return type(self).__name__
Use plugin().name along with plugin.__name__ to discriminate plugins
from their name in the plugin-runner.py.
Change-Id: Ie478427ffd78c45cdab8dd1e842b3736020cd710
TN: N623-022
Exports a new function GNAThub.verbose() in Python which returns True if
--verbose was supplied to GNAThub, False otherwise.
Use this to choose whether to display the command-line executed by
GNAThub plugins to invoke tools.
Change-Id: Iefd5d709b2fa2bb2639816b9d8da7c0b1ece7b53
TN: N806-028
The lack of such support was uncovered by a customer that wants to
access the "Main" attribute of the project file. Generalizing the
"Property_As_String" and "Property_As_List" routine is simple enough and
does not break backward compatibility.
src/gnathub/ChangeLog:
* gnathub-project.ad? (GNATdashboard_Package): Rename the constant for
consistency with GNATCOLL.Project and make its declaration public so
that it can be referenced from other packages (in particular:
GNAThub.Python).
(Property_As_List, Property_As_String): New optional parameter
"Package_Name". Defaults to GNATdashboard_Package.
* gnathub-pyhton.adb (Register_Project_Class): Register the optional
parameter "package" to Python static methods property_as_list and
property_as_string.
src/lib/GNAThub/ChangeLog:
* __init__.py (property_as_list, property_as_string): Update
documentation.
testsuite/tests/api-python/project/*:
* Add a new test to extract the "main" attribute from the project
file.
features-10: New features file to keep track of enhancements.
Change-Id: I2f6808b95f76581432e0893847b951183d4ca341
TN: N623-022
This static method now returns a dictionary associating project name to
a list of source directories.
This will be needed when integrating imported projects as modules within
SonarQube.
Change-Id: If92313c8ea68cf7d17728c26d6d57f415792c6ba
Remove two deprecated methods: fqn and display_command_line(), and a
deprecated attribute: LOG_FILE.
Also refactor the code and normalize the plug-ins output.
Change-Id: I1a346f0dc4c705cf03199f348006aabdab0ad56f
Distinguish routines to print GNAThub output with routines to log the
execution of GNAThub and its plug-ins.
Define a new Logger class and export it to Python. Plug-ins can simply
use the pre-defined self.log instance variable for logging.
Update all occurrences of printing and logging in the sources.
Also update two tests to ensure they do not attempt to run any other
plug-in than SonarConfig.
Change-Id: I47bd3a4fc243a70c12138ca2b8e854d770dbae82