reinstate shouldProcess in codeState
initial results showed this might be marginally slower when running
complexity calculations (~0.5%, possibly random variation), but it's
still a significant improvement when they're omitted.
@@ -125,6 +125,7 @@ func codeState(
return i, currentState, endString, endComments
}
+ if shouldProcess(curByte, langFeatures.ProcessMask) {
if Duplicates {
// Technically this is wrong because we skip bytes so this is not a true
// hash of the file contents, but for duplicate files it shouldn't matter
@@ -156,6 +157,7 @@ func codeState(
}
}
}
+ }
return index, currentState, endString, endComments
}
