Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65581

Errors reported from ESLint/ClangTidy are extremely difficult to locate

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Dev Platform 2022-05-16, Dev Platform 2022-05-30

      The eslint task outputs about 500 lines of log output of which only a couple are the actual error.

      In this example, the actual error is buried somewhere in the middle and is in the same colour as the rest of the log, therefore extremely hard to visually locate:

      [2022/04/13 17:42:27.190] ERROR: ESLint found errors in /data/mci/eaab7ae7f0a51a1517947dd4ea3b7365/src/jstests
      [2022/04/13 17:42:27.190] b"/data/mci/eaab7ae7f0a51a1517947dd4ea3b7365/src/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js:529:17: Duplicate key '$or'. [Error/no-dupe-keys]\n\n1 problem\n"
      [2022/04/13 17:42:27.190] ERROR: ESLint found errors. Run ESLint manually to see errors in files that were skipped
      

      This is not an issue with just ESLint, ClangTidy has the same problem and outputs even more log, some of which is highlighted in red, but this is a "red herring".

      We should do a better job at highlighting these errors.

      Perhaps we can remove some of the other log which is being reported as part of the task and redirect it to a different tab. For example, not sure why as someone who is changing code in the core server do I need to see this:

      [2022/04/13 17:42:28.200] Finished 'subprocess.exec' in "upload npm logs" in 146.226483ms
      [2022/04/13 17:42:28.200] Running command 'archive.targz_pack' in "upload npm logs" (step 2.3 of 22)
      [2022/04/13 17:42:28.201] Finished 'archive.targz_pack' in "upload npm logs" in 578.814┬Ás
      [2022/04/13 17:42:28.201] Running command 's3.put' in "upload npm logs" (step 2.4 of 22)
      [2022/04/13 17:42:28.221] Putting private files into s3
      [2022/04/13 17:42:28.221] performing s3 put of a hidden file
      [2022/04/13 17:42:28.221] Command failed: missing file '/data/mci/eaab7ae7f0a51a1517947dd4ea3b7365/npm-logs.tgz': problem opening file /data/mci/eaab7ae7f0a51a1517947dd4ea3b7365/npm-logs.tgz: open /data/mci/eaab7ae7f0a51a1517947dd4ea3b7365/npm-logs.tgz: no such file or directory
      [2022/04/13 17:42:28.221] Finished 's3.put' in "upload npm logs" in 20.538546ms
      

            Assignee:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: