)]}'
{
  "commit": "5385a295ec00eb80525ec7ff1d97e13e06ba77b7",
  "tree": "66ee4ad7e475ec5406d9f81ad5498619809d15d6",
  "parents": [
    "f91af1c69c57664a508fa054ce1e2cdf74741f00"
  ],
  "author": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Thu Apr 26 15:54:27 2018 +0200"
  },
  "committer": {
    "name": "Jonathan Corbet",
    "email": "corbet@lwn.net",
    "time": "Fri Apr 27 16:45:49 2018 -0600"
  },
  "message": "scripts: Add SPDX checker script\n\nThe SPDX-License-Identifiers are growing in the kernel and so grow\nexpression failures and license IDs are used which have no corresponding\nlicense text file in the LICENSES directory.\n\nAdd a script which gathers information from the LICENSES directory,\ni.e. the various tags in the licenses and exception files and then scans\neither input from stdin, which it treats as a single file or if started\nwithout arguments it scans the full kernel tree.\n\nIt checks whether the license expression syntax is correct and also\nvalidates whether the license identifiers used in the expressions are\navailable in the LICENSES files.\n\nscripts/spdxcheck.py -h\nusage: spdxcheck.py [-h] [-m MAXLINES] [-v] [path [path ...]]\n\nSPDX expression checker\n\npositional arguments:\n  path                  Check path or file. If not given full git tree scan.\n                        For stdin use \"-\"\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -m MAXLINES, --maxlines MAXLINES\n                        Maximum number of lines to scan in a file. Default 15\n  -v, --verbose         Verbose statistics output\n\ninclude/dt-bindings/reset/amlogic,meson-axg-reset.h: 9:41 Invalid License ID: BSD\n\ndrivers/pinctrl/sh-pfc/pfc-r8a77965.c: 1:28 Invalid License ID: GPL-2.\ninclude/dt-bindings/reset/amlogic,meson-axg-reset.h: 9:41 Invalid License ID: BSD\n\narch/x86/kernel/jailhouse.c: 1:28 Invalid License ID: GPL2.0\ninclude/dt-bindings/reset/amlogic,meson-axg-reset.h: 9:41 Invalid License ID: BSD\n\narch/arm/mach-s3c24xx/h1940-bluetooth.c: 1:28 Invalid License ID: GPL-1.0\narch/x86/kernel/jailhouse.c: 1:28 Invalid License ID: GPL2.0\ndrivers/pinctrl/sh-pfc/pfc-r8a77965.c: 1:28 Invalid License ID: GPL-2.\ninclude/dt-bindings/reset/amlogic,meson-axg-reset.h: 9:41 Invalid License ID: BSD\narch/x86/include/asm/jailhouse_para.h: 1:28 Invalid License ID: GPL2.0\n\narch/arm/mach-s3c24xx/h1940-bluetooth.c: 1:28 Invalid License ID: GPL-1.0\narch/x86/kernel/jailhouse.c: 1:28 Invalid License ID: GPL2.0\ndrivers/pinctrl/sh-pfc/pfc-r8a77965.c: 1:28 Invalid License ID: GPL-2.\ninclude/dt-bindings/reset/amlogic,meson-axg-reset.h: 9:41 Invalid License ID: BSD\narch/x86/include/asm/jailhouse_para.h: 1:28 Invalid License ID: GPL2.0\n\nLicense files:               14\nException files:              1\nLicense IDs                  19\nException IDs                 1\n\nFiles checked:            61332\nLines checked:           669181\nFiles with SPDX:          16169\nFiles with errors:            5\n\nreal\t0m2.642s\nuser\t0m2.231s\nsys\t0m0.467s\n\nThat\u0027s a full tree sweep on my laptop. Note, this runs single threaded.\n\nIt scans by default the first 15 lines for a SPDX identifier where the\ncurrent max inside a top comment is at line 10. But that\u0027s going to be\nfaster once the identifiers are all in the first two lines as documented.\n\nThe python wizards will surely know how to do that smarter and faster, but\nits at least better than no tool at all.\n\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nReviewed-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n[jc: Fixed ironically erroneous SPDX tag and did chmod +x ]\nSigned-off-by: Jonathan Corbet \u003ccorbet@lwn.net\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7deaef297f529d30a090ea671fa503f5565639fe",
      "new_mode": 33261,
      "new_path": "scripts/spdxcheck.py"
    }
  ]
}
