Skip to content
Permalink
Browse files

Added more constant-related binning.

  • Loading branch information
emeryberger committed Mar 20, 2020
1 parent 2b78905 commit 27e14233b89ef73299d31a0f7d8cffccbf47a388
Showing with 27 additions and 0 deletions.
  1. +14 −0 src/components/excelint-cli-new.js
  2. +13 −0 src/components/excelint-cli-new.ts
@@ -267,6 +267,20 @@ for (var _i = 0, parameters_1 = parameters; _i < parameters_1.length; _i++) {
bin.push("number-of-constants-mismatch");
}
}
// Both constants.
if ((all_numbers[0].length > 0) && (all_numbers[1].length > 0)) {
// Both have numbers.
if (dependence_count[0] + dependence_count[1] === 0) {
// Both have no dependents.
bin.push("both-constants");
}
else {
if (dependence_count[0] * dependence_count[1] === 0) {
// One is a constant.
bin.push("one-is-all-constants");
}
}
}
// Mismatched R1C1 representation.
if (r1c1_formulas[0] !== r1c1_formulas[1]) {
// The formulas don't match, but it could
@@ -297,6 +297,19 @@ for (let parms of parameters) {
bin.push("number-of-constants-mismatch");
}
}
// Both constants.
if ((all_numbers[0].length > 0) && (all_numbers[1].length > 0)) {
// Both have numbers.
if (dependence_count[0] + dependence_count[1] === 0) {
// Both have no dependents.
bin.push("both-constants");
} else {
if (dependence_count[0] * dependence_count[1] === 0) {
// One is a constant.
bin.push("one-is-all-constants");
}
}
}
// Mismatched R1C1 representation.
if (r1c1_formulas[0] !== r1c1_formulas[1]) {
// The formulas don't match, but it could

0 comments on commit 27e1423

Please sign in to comment.
You can’t perform that action at this time.