19 Commits

Author SHA1 Message Date
Vadim Godunko
4d3fece20b Reformat support code and plugins with black 2024-06-06 12:20:22 +00:00
Boulanger
a413c89114 GNATSAS support
- Remove switches like compiler-mode
- Separate Run in 2 phases: analyze and then report
- CPL is no longer supported, reuse part of it for GNATSAS
- Handle path not yet transitioned to GNATSAS
- Create Actions and menu for GNATSAS
- Only show Codepeer when GNATSAS is not available

eng/ide/gnatstudio#54

(cherry picked from commit 36079ee283)
2023-09-26 10:42:26 +00:00
Boris Yakobowski
bd9f05914b Fix typo
(cherry picked from commit 2be8eecaa7)
2023-08-07 14:10:14 +00:00
Clément Fumex
2f931722c9 update to sam
(cherry picked from commit 654d085169)
2023-08-07 14:10:14 +00:00
Clément Fumex
59bbe563e3 remove CWE attribute
Part of eng/codepeer/codepeer#287

(cherry picked from commit 44eec6fea6)
2023-08-07 14:10:14 +00:00
Clément Fumex
ad1ae8465c Temporary gnatsas support
This commit patches GS in order to support gnatsas at minima, through
the actual codepeer menu, before the new gnatsas menu.

(cherry picked from commit aa906c22d0)
2023-08-07 14:10:14 +00:00
Clément Fumex
b639ee1024 correct csv output menu 2023-05-30 17:04:12 +02:00
Nicolas Setton
fca1562e70 W207-014 Add support for --no-default-gnatcheck-rules
... in the CodePeer launch target dialog.

Change-Id: Ibeff79debb70271b0f6fa1bc72727164211095ee
2023-05-04 16:39:47 +02:00
Clément Fumex
7dc7279832 add a new target name for cpl codepeer
In order to reset command history for the menus, and not back-port
deprecated switches.
2023-04-19 16:24:20 +00:00
Clément Fumex
3ade2ee875 remove output_directory project attribute from CodePeer package 2023-04-19 16:23:02 +00:00
Adrien Boulanger
ed12c64f59 Fix freeze when editing Codepeer switch in GS
Infinite recursion when parsing "--gnat-warnings=" because it's
defined at 2 different places making the expension unable to
stabilize.

/eng/codepeer/codepeer!340
2023-04-13 16:50:19 +00:00
Clément Fumex
81a6b92410 Add field to specify CodePeer run name in Analyze… menu 2023-04-03 12:30:50 +00:00
Clément Fumex
783f4dcc7a remove "Generate CodePeer messages" in Generace SCIL menu 2023-04-03 12:30:50 +00:00
Clément Fumex
23c7326963 Plug back "Run CodePeer File" menu 2023-04-03 12:30:50 +00:00
Clément Fumex
daee6787df Update Generate HTML/CSV report... menus 2023-04-03 12:30:50 +00:00
Clément Fumex
d61068c5a7 remove "Compare with" option in analyse menu
... since this is a "regenerate report" option only.
2023-04-03 12:30:50 +00:00
Clément Fumex
4b7c4faf2a update --set-baseline interface 2023-04-03 12:30:50 +00:00
Clément Fumex
697256b780 add --log-to to cpm-gs-bridge
This tells cpm-gs-bridge to write its log file in the object directory
of the root project instead of the current directory.
2023-04-03 12:30:50 +00:00
Clément Fumex
8754dc0a9d V110-023 support post cpl CodePeer
All the changes are under the Is_CPL flag, and should not affect pre-cpl
codepeer integration.

* code_analysis/src/codepeer-bridge-commands.adb
+ Write cpm_file and cpm_directory to all requests.
+ Add CPL_Id to add_audit_record.
+ Add annotation files to inspection request.

* code_analysis/src/codepeer-bridge-inspection_readers-base.adb
+ Clear annotation files set before parsing inspection file.
+ Read reviews (Audit trails) directly from inspection_data.xml.
+ Read review statuses directly from inspection_data.xml.
+ Read annotation files and CPL_Id fields.

* code_analysis/src/codepeer-bridge-inspection_readers.adb
+ Change Identifier_Attribute's type from Natural to String to be able to
  deal both old run ids and new run names.
+ Parse "cpm_file".

* code_analysis/src/codepeer-module-actions.adb
+ Do not register compiler mode action with cpl codepeer since it has been
  removed.

* code_analysis/src/codepeer-module-bridge.adb
+ Add Just_Load argument to Inspection in order to not call the bridge but
  and only set Module's variables.

* code_analysis/src/codepeer-module.adb
+ Add cpm_directory project file attribute and function to retrieve it.
+ Add CPL_Id to codepeer msg.
+ Add --show-annotations switch when spawning CodePeer in case
  Import_Annotations is set in the preferences. This is needed since we do
  not systematically go through the bridge to load messages.
+ Ignore status file.
+ In case of Load_UI, properly set Just_Load and then directly call
  Module.Load. Whith CPL when we launch CodePeer, it will directly produce
  inspection_data.xml without a need to launch the bridge (this is in order
  to properly initialize cpm_file and the annotation files).
+ Mark all messages' reviews as loaded since we did so when reading
  inspection_data.xml
+ Set the Is_CPL flag if we find the correct binary in the parent folder of
  CodePeer executable
+ Remove "Show msg Id" and "Import backtraces" menu options. The former
  does not make sens anymore, and the latter is now always on.

* code_analysis/src/codepeer-reports.adb
+ Print the inspection label as a name instead of an id.

* code_analysis/src/codepeer.ads
+ Define Is_CPL flag.
+ Define CPM_File. This stores the currently displayed cpm_file (if any)
+ Define Annot_Files, set of annotation files displayed, if any. Read from
  inspection_data.xml, and used in inspection_request.
+ Define CPL_Id. This is used to identify a message when making reviews, it
  replaces msg_id.
+ Change Inspection type to string, we use Natural'Image at parsing with
  pre-cpl CodePeer.

* share/support/core/codepeer.py
+ Move xml code to codepeer_xml.py and codepeer_xml_old.py. Import the
  former if we detect a cpl CodePeer, the latter otherwise.

* share/support/core/codepeer_xml.py
Update the attributes, tool and menu description for cpl CodePeer.

* share/support/core/codepeer_xml_old.py
Content from old codepeer.py

Change-Id: I18eec48fbc7c2d07e41fa25cd9febb44f305a136
2022-11-18 15:19:14 +00:00