Add settings for controlling the Trojan Code confusables checks.

Review Request #12787 — Created Jan. 13, 2023 and submitted

Information

Review Board
release-5.0.x

Reviewers

This introduces new settings in the Diff Viewer Settings page to control
whether Trojan Code confusable checks should be enabled or which
languages should be considered safe.

This is shown in-between the "Limits" and "Advanced" section. The list
of languages is presented as a series of checkboxes. There aren't too
many there, and we don't really have a better widget for displaying this
list at this time (ideally we'd use the Related Object selector, but
it's not built for this, and I wanted to minimize the UI work for this
particular change).

These settings are stored in a general way, opening the door for future
code safety checker preferences. They're available to the diff machinery
through the new DiffSettings object, and used in the chunk generator
when performing a check.

Changing these settings will automatically invalidate any caches/ETags,
ensuring they take effect immediately.

Unit tests pass.

Tested with a Trojan Code sample set, tested with confusable checks on,
on with excluded languages, and off. Verified that the caches always
reflected the new settings, and that the results were what I expected.

Summary ID
Add settings for controlling the Trojan Code confusables checks.
This introduces new settings in the Diff Viewer Settings page to control whether Trojan Code confusable checks should be enabled or which languages should be considered safe. This is shown in-between the "Limits" and "Advanced" section. The list of languages is presented as a series of checkboxes. There aren't too many there, and we don't really have a better widget for displaying this list at this time (ideally we'd use the Related Object selector, but it's not built for this, and I wanted to minimize the UI work for this particular change). These settings are stored in a general way, opening the door for future code safety checker preferences. They're available to the diff machinery through the new `DiffSettings` object, and used in the chunk generator when performing a check. Changing these settings will automatically invalidate any caches/ETags, ensuring they take effect immediately.
7cb245f4d4cf274d8546196b4300661a90b3e3ec
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.0.x (7df5903)
Loading...