Skip to content

Commit

Permalink
lift DEFAULT_RULES out to a module variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnen committed Feb 21, 2018
1 parent 2c6f6b6 commit 4399d72
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions socorro/processor/processor_2015.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,43 @@
Winsock_LSPRule,
)

DEFAULT_RULES = [
# rules to change the internals of the raw crash
ProductRewrite,
ESRVersionRewrite,
PluginContentURL,
PluginUserComment,
# rules to transform a raw crash into a processed crash
IdentifierRule,
BreakpadStackwalkerRule2015,
ProductRule,
UserDataRule,
EnvironmentRule,
PluginRule,
AddonsRule,
DatesAndTimesRule,
OutOfMemoryBinaryRule,
JavaProcessRule,
Winsock_LSPRule,
# post processing of the processed crash
CrashingThreadRule,
CPUInfoRule,
OSInfoRule,
BetaVersionRule,
ExploitablityRule,
AuroraVersionFixitRule,
FlashVersionRule,
OSPrettyVersionRule,
TopMostFilesRule,
MissingSymbolsRule,
ThemePrettyNameRule,
MemoryReportExtraction,
# a set of classifiers to help with jit crashes
JitCrashCategorizeRule,
# generate signature now that we've done all the processing it depends on
SignatureGeneratorRule,
]


default_rule_set = [
# rules to change the internals of the raw crash
Expand Down Expand Up @@ -210,42 +247,7 @@ def __init__(self, config, rules=None, quit_check_callback=None):
else:
self.quit_check = lambda: False

rule_set = rules or [
# rules to change the internals of the raw crash
ProductRewrite,
ESRVersionRewrite,
PluginContentURL,
PluginUserComment,
# rules to transform a raw crash into a processed crash
IdentifierRule,
BreakpadStackwalkerRule2015,
ProductRule,
UserDataRule,
EnvironmentRule,
PluginRule,
AddonsRule,
DatesAndTimesRule,
OutOfMemoryBinaryRule,
JavaProcessRule,
Winsock_LSPRule,
# post processing of the processed crash
CrashingThreadRule,
CPUInfoRule,
OSInfoRule,
BetaVersionRule,
ExploitablityRule,
AuroraVersionFixitRule,
FlashVersionRule,
OSPrettyVersionRule,
TopMostFilesRule,
MissingSymbolsRule,
ThemePrettyNameRule,
MemoryReportExtraction,
# a set of classifiers to help with jit crashes
JitCrashCategorizeRule,
# generate signature now that we've done all the processing it depends on
SignatureGeneratorRule,
]
rule_set = rules or list(DEFAULT_RULES)

self.rules = []
for a_rule_class in rule_set:
Expand Down

0 comments on commit 4399d72

Please sign in to comment.