Skip to content

Commit

Permalink
refact(Rules): rules re-numbering to match unified repository IDs (gr…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Grousset committed May 17, 2024
1 parent 96cd2d4 commit 994bf41
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import static io.ecocode.ios.swift.checks.CheckHelper.isImportExisting;

@Rule(key = "EC522")
@Rule(key = "EC524")
public class ThriftyGeolocation extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Adapt location accuracy and type to applications needs.";
private Swift5Parser.Import_declarationContext importTree = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Check the presence of the class "Timer".
*/
@Rule(key = "EC506")
@Rule(key = "EC509")
public class RigidAlarmCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Setting a tolerance for timers will allow them to fire later than the scheduled fire date.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import static io.ecocode.ios.swift.checks.CheckHelper.isImportExisting;

@Rule(key="EC547")
@Rule(key="EC534")
public class MotionSensorUpdateRateCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Set appropriate motion sensor update rates for the application's needs";
private Swift5Parser.Import_declarationContext importTree = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* or `UIDevice.batteryLevelDidChangeNotification` or `UIDevice.batteryStateDidChangeNotification`.
* If found, reports a (positive) issue.
*/
@Rule(key = "EC602")
@Rule(key = "EC519")
public class ChargeAwarenessCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Monitoring power changes and customizing behavior depending on battery level is a good practice";
private static final String PROPERTY_BATTERY_LEVEL = "UIDevice.current.batteryLevel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import java.util.List;

@Rule(key = "EC543")
@Rule(key = "EC520")
public class SaveModeAwarenessCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Taking into account when the device is entering or exiting the power save mode is a good practice";
private static final String PROCESS_INFO = "ProcessInfo.processInfo.isLowPowerModeEnabled";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Check the use of "UIScreen.main.brightness" and triggers when set.
*/
@Rule(key = "EC523")
@Rule(key = "EC522")
public class BrightnessOverrideCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Do not force Brightness in your code, unless absolutely necessary";
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Check the use of "CLLocationManager#pausesLocationUpdatesAutomatically" and triggers when set to false.
*/
@Rule(key = "EC521")
@Rule(key = "EC533")
public class LocationUpdatesDisabledCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Do not disable location updates pause, unless absolutely necessary";
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Check the use of "AVCaptureTorchMode.on", "setTorchModeOn(level: Float)", or "torchMode = .on" and triggers when set to true.
*/
@Rule(key = "EC503")
@Rule(key = "EC530")
public class TorchFreeCheck extends SwiftRuleCheck {
private static final String DEFAULT_ISSUE_MESSAGE = "Usage of `AVCaptureDevice#torchMode` or `AVCaptureDevice#setTorchModeOn(level:)` must absolutely be avoided";
@Override
Expand Down

0 comments on commit 994bf41

Please sign in to comment.