Bug 1444167 Add a MinGW Header Capitalization lint job r?ahal draft
authorTom Ritter <tom@mozilla.com>
Thu, 08 Mar 2018 13:41:00 -0600
changeset 766883 ade0e60f6c2bfeb6b558a6ed555d2e4e5bc27940
parent 764637 a8ce65f07cba00188786224cb38f4f0ae66276dd
child 766884 a29f654d193529563080c221afe85d2908e0c609
push id102429
push userbmo:tom@mozilla.com
push dateTue, 13 Mar 2018 14:37:49 +0000
reviewersahal
bugs1444167
milestone60.0a1
Bug 1444167 Add a MinGW Header Capitalization lint job r?ahal MinGW headers are all lowercase, and because we build FF with MinGW on Linux - capitalization matters. But if you're plugging along, working on Windows, you might forget about that, and wind up inadvertently breaking the MinGW build because you capitalized an include file (as is common in Windows development.) This lint job takes the list of header files from MinGW (generated by cd mingw-w64/mingw-w64-headers && find . -name "*.h" | xargs -I bob -- basename bob | sort | uniq) and will alert if they are in an #include statement but not all-lowercase. MozReview-Commit-ID: 4QFSdHx5Uak
tools/lint/cpp/__init__.py
tools/lint/cpp/mingw-capitalization.py
tools/lint/cpp/mingw-headers.txt
tools/lint/mingw-capitalization.yml
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/tools/lint/cpp/mingw-capitalization.py
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+import re
+
+from mozlint.types import LineType
+
+here = os.path.abspath(os.path.dirname(__file__))
+HEADERS_FILE = os.path.join(here, 'mingw-headers.txt')
+# generated by cd mingw-w64/mingw-w64-headers &&
+#  find . -name "*.h" | xargs -I bob -- basename bob | sort | uniq)
+
+
+class MinGWCapitalization(LineType):
+    def __init__(self, *args, **kwargs):
+        super(MinGWCapitalization, self).__init__(*args, **kwargs)
+        with open(HEADERS_FILE, 'r') as fh:
+            self.headers = fh.read().strip().splitlines()
+        self.regex = re.compile("^#include\s*<(" + "|".join(self.headers) + ")>")
+
+    def condition(self, payload, line):
+        if not line.startswith("#include"):
+            return False
+        if self.regex.search(line, re.I):
+            return not self.regex.search(line)
+
+
+def lint(paths, config, **lintargs):
+    results = []
+
+    m = MinGWCapitalization()
+    for path in paths:
+        results.extend(m._lint(path, config, **lintargs))
+    return results
new file mode 100755
--- /dev/null
+++ b/tools/lint/cpp/mingw-headers.txt
@@ -0,0 +1,1452 @@
+accctrl.h
+aclapi.h
+aclui.h
+acpiioct.h
+activation.h
+activaut.h
+activdbg100.h
+activdbg.h
+activecf.h
+activeds.h
+activprof.h
+activscp.h
+adc.h
+adhoc.h
+admex.h
+adoctint.h
+adodef.h
+adogpool_backcompat.h
+adogpool.h
+adoguids.h
+adoid.h
+adoint_backcompat.h
+adoint.h
+adojet.h
+adomd.h
+adptif.h
+adsdb.h
+adserr.h
+adshlp.h
+adsiid.h
+adsnms.h
+adsprop.h
+adssts.h
+adtgen.h
+advpub.h
+afilter.h
+af_irda.h
+afxres.h
+agtctl.h
+agterr.h
+agtsvr.h
+alg.h
+alink.h
+amaudio.h
+amstream.h
+amtvuids.h
+amvideo.h
+apdevpkey.h
+apisetcconv.h
+apiset.h
+appmgmt.h
+aqadmtyp.h
+asptlb.h
+assert.h
+atacct.h
+atalkwsh.h
+atm.h
+atsmedia.h
+audevcod.h
+audioapotypes.h
+audioclient.h
+audioendpoints.h
+audioengineendpoint.h
+audiopolicy.h
+audiosessiontypes.h
+austream.h
+authif.h
+authz.h
+aux_ulib.h
+avifmt.h
+aviriff.h
+avrfsdk.h
+avrt.h
+axextendenums.h
+azroles.h
+basetsd.h
+basetyps.h
+batclass.h
+bcrypt.h
+bdaiface_enums.h
+bdaiface.h
+bdamedia.h
+bdasup.h
+bdatypes.h
+bemapiset.h
+bh.h
+bidispl.h
+bits1_5.h
+bits2_0.h
+bitscfg.h
+bits.h
+bitsmsg.h
+blberr.h
+bluetoothapis.h
+_bsd_types.h
+bthdef.h
+bthsdpdef.h
+bugcodes.h
+callobj.h
+cardmod.h
+casetup.h
+cchannel.h
+cdefs.h
+cderr.h
+cdoexerr.h
+cdoex.h
+cdoexm.h
+cdoexstr.h
+cdonts.h
+cdosyserr.h
+cdosys.h
+cdosysstr.h
+celib.h
+certadm.h
+certbase.h
+certbcli.h
+certcli.h
+certenc.h
+certenroll.h
+certexit.h
+certif.h
+certmod.h
+certpol.h
+certreqd.h
+certsrv.h
+certview.h
+cfg.h
+cfgmgr32.h
+cguid.h
+chanmgr.h
+cierror.h
+classpnp.h
+clfs.h
+clfsmgmt.h
+clfsmgmtw32.h
+clfsw32.h
+client.h
+cluadmex.h
+clusapi.h
+cluscfgguids.h
+cluscfgserver.h
+cluscfgwizard.h
+cmdtree.h
+cmnquery.h
+codecapi.h
+colordlg.h
+comadmin.h
+combaseapi.h
+comcat.h
+comdef.h
+comdefsp.h
+comip.h
+comlite.h
+commapi.h
+commctrl.h
+commdlg.h
+commoncontrols.h
+complex.h
+compobj.h
+compressapi.h
+compstui.h
+comsvcs.h
+comutil.h
+confpriv.h
+conio.h
+conio_s.h
+control.h
+corecrt_startup.h
+corerror.h
+corewrappers.h
+cor.h
+corhdr.h
+correg.h
+cplext.h
+cpl.h
+credssp.h
+crtdbg.h
+crtdbg_s.h
+crtdefs.h
+cryptuiapi.h
+cryptxml.h
+cscapi.h
+cscobj.h
+csq.h
+ctfutb.h
+ctxtcall.h
+ctype.h
+custcntl.h
+_cygwin.h
+d2d1_1.h
+d2d1_1helper.h
+d2d1effectauthor.h
+d2d1effecthelpers.h
+d2d1effects.h
+d2d1.h
+d2d1helper.h
+d2dbasetypes.h
+d2derr.h
+d3d10_1.h
+d3d10_1shader.h
+d3d10effect.h
+d3d10.h
+d3d10misc.h
+d3d10sdklayers.h
+d3d10shader.h
+d3d11_1.h
+d3d11_2.h
+d3d11_3.h
+d3d11_4.h
+d3d11.h
+d3d11sdklayers.h
+d3d11shader.h
+d3d8caps.h
+d3d8.h
+d3d8types.h
+d3d9caps.h
+d3d9.h
+d3d9types.h
+d3dcaps.h
+d3dcommon.h
+d3dcompiler.h
+d3d.h
+d3dhalex.h
+d3dhal.h
+d3dnthal.h
+d3drmdef.h
+d3drm.h
+d3drmobj.h
+d3dtypes.h
+d3dx9anim.h
+d3dx9core.h
+d3dx9effect.h
+d3dx9.h
+d3dx9math.h
+d3dx9mesh.h
+d3dx9shader.h
+d3dx9shape.h
+d3dx9tex.h
+d3dx9xof.h
+d4drvif.h
+d4iface.h
+daogetrw.h
+datapath.h
+datetimeapi.h
+davclnt.h
+dbdaoerr.h
+_dbdao.h
+dbdaoid.h
+dbdaoint.h
+dbgautoattach.h
+_dbg_common.h
+dbgeng.h
+dbghelp.h
+_dbg_LOAD_IMAGE.h
+dbgprop.h
+dbt.h
+dciddi.h
+dciman.h
+dcommon.h
+dcompanimation.h
+dcomp.h
+dcomptypes.h
+dde.h
+ddeml.h
+dderror.h
+ddkernel.h
+ddkmapi.h
+ddrawgdi.h
+ddraw.h
+ddrawi.h
+ddrawint.h
+ddstream.h
+debugapi.h
+delayimp.h
+devguid.h
+devicetopology.h
+devioctl.h
+devpkey.h
+devpropdef.h
+dhcpcsdk.h
+dhcpsapi.h
+dhcpssdk.h
+dhcpv6csdk.h
+dhtmldid.h
+dhtmled.h
+dhtmliid.h
+digitalv.h
+dimm.h
+dinput.h
+direct.h
+dirent.h
+dir.h
+diskguid.h
+dispatch.h
+dispdib.h
+dispex.h
+dlcapi.h
+dlgs.h
+dls1.h
+dls2.h
+dmdls.h
+dmemmgr.h
+dmerror.h
+dmksctrl.h
+dmodshow.h
+dmo.h
+dmoreg.h
+dmort.h
+dmplugin.h
+dmusbuff.h
+dmusicc.h
+dmusicf.h
+dmusici.h
+dmusicks.h
+dmusics.h
+docobjectservice.h
+docobj.h
+documenttarget.h
+domdid.h
+dos.h
+downloadmgr.h
+dpaddr.h
+dpapi.h
+dpfilter.h
+dplay8.h
+dplay.h
+dplobby8.h
+dplobby.h
+dpnathlp.h
+driverspecs.h
+drivinit.h
+drmexternals.h
+drmk.h
+dsadmin.h
+dsclient.h
+dsconf.h
+dsdriver.h
+dsgetdc.h
+dshow.h
+dskquota.h
+dsound.h
+dsquery.h
+dsrole.h
+dssec.h
+dtchelp.h
+dvbsiparser.h
+dvdevcod.h
+dvdmedia.h
+dvec.h
+dvobj.h
+dvp.h
+dwmapi.h
+dwrite_1.h
+dwrite_2.h
+dwrite_3.h
+dwrite.h
+dxapi.h
+dxdiag.h
+dxerr8.h
+dxerr9.h
+dxfile.h
+dxgi1_2.h
+dxgi1_3.h
+dxgi1_4.h
+dxgi1_5.h
+dxgicommon.h
+dxgiformat.h
+dxgi.h
+dxgitype.h
+dxtmpl.h
+dxva2api.h
+dxva.h
+dxvahd.h
+eapauthenticatoractiondefine.h
+eapauthenticatortypes.h
+eaphosterror.h
+eaphostpeerconfigapis.h
+eaphostpeertypes.h
+eapmethodauthenticatorapis.h
+eapmethodpeerapis.h
+eapmethodtypes.h
+eappapis.h
+eaptypes.h
+edevdefs.h
+eh.h
+ehstorapi.h
+elscore.h
+emostore.h
+emptyvc.h
+endpointvolume.h
+errhandlingapi.h
+errno.h
+error.h
+errorrep.h
+errors.h
+esent.h
+evcode.h
+evcoll.h
+eventsys.h
+evntcons.h
+evntprov.h
+evntrace.h
+evr9.h
+evr.h
+exchform.h
+excpt.h
+exdisp.h
+exdispid.h
+fci.h
+fcntl.h
+fdi.h
+_fd_types.h
+fenv.h
+fibersapi.h
+fileapi.h
+fileextd.h
+file.h
+filehc.h
+filter.h
+filterr.h
+float.h
+fltdefs.h
+fltsafe.h
+fltuser.h
+fltuserstructures.h
+fltwinerror.h
+fpieee.h
+fsrmenums.h
+fsrmerr.h
+fsrm.h
+fsrmpipeline.h
+fsrmquota.h
+fsrmreports.h
+fsrmscreen.h
+ftsiface.h
+ftw.h
+functiondiscoveryapi.h
+functiondiscoverycategories.h
+functiondiscoveryconstraints.h
+functiondiscoverykeys_devpkey.h
+functiondiscoverykeys.h
+functiondiscoverynotification.h
+fusion.h
+fvec.h
+fwpmtypes.h
+fwpmu.h
+fwptypes.h
+gb18030.h
+gdiplusbase.h
+gdiplusbrush.h
+gdipluscolor.h
+gdipluscolormatrix.h
+gdipluseffects.h
+gdiplusenums.h
+gdiplusflat.h
+gdiplusgpstubs.h
+gdiplusgraphics.h
+gdiplus.h
+gdiplusheaders.h
+gdiplusimageattributes.h
+gdiplusimagecodec.h
+gdiplusimaging.h
+gdiplusimpl.h
+gdiplusinit.h
+gdipluslinecaps.h
+gdiplusmatrix.h
+gdiplusmem.h
+gdiplusmetafile.h
+gdiplusmetaheader.h
+gdipluspath.h
+gdipluspen.h
+gdipluspixelformats.h
+gdiplusstringformat.h
+gdiplustypes.h
+getopt.h
+glaux.h
+glcorearb.h
+glext.h
+gl.h
+glu.h
+glxext.h
+gpedit.h
+gpio.h
+gpmgmt.h
+guiddef.h
+h323priv.h
+handleapi.h
+heapapi.h
+hidclass.h
+hidpi.h
+hidsdi.h
+hidusage.h
+highlevelmonitorconfigurationapi.h
+hlguids.h
+hliface.h
+hlink.h
+hostinfo.h
+hstring.h
+htiface.h
+htiframe.h
+htmlguid.h
+htmlhelp.h
+httpext.h
+httpfilt.h
+http.h
+httprequestid.h
+hubbusif.h
+ia64reg.h
+iaccess.h
+iadmext.h
+iadmw.h
+iads.h
+icftypes.h
+icm.h
+icmpapi.h
+icodecapi.h
+icrsint.h
+i_cryptasn1tls.h
+ide.h
+identitycommon.h
+identitystore.h
+idf.h
+idispids.h
+iedial.h
+ieeefp.h
+ieverp.h
+ifdef.h
+iiisext.h
+iiis.h
+iimgctx.h
+iiscnfg.h
+iisrsta.h
+iketypes.h
+imagehlp.h
+ime.h
+imessage.h
+imm.h
+in6addr.h
+inaddr.h
+indexsrv.h
+inetreg.h
+inetsdk.h
+infstr.h
+initguid.h
+initoid.h
+inputscope.h
+inspectable.h
+interlockedapi.h
+internal.h
+intrin.h
+intrin-impl.h
+intsafe.h
+intshcut.h
+inttypes.h
+invkprxy.h
+ioaccess.h
+ioapiset.h
+ioevent.h
+io.h
+ipexport.h
+iphlpapi.h
+ipifcons.h
+ipinfoid.h
+ipmib.h
+_ip_mreq1.h
+ipmsp.h
+iprtrmib.h
+ipsectypes.h
+_ip_types.h
+iptypes.h
+ipxconst.h
+ipxrip.h
+ipxrtdef.h
+ipxsap.h
+ipxtfflt.h
+iscsidsc.h
+isguids.h
+issper16.h
+issperr.h
+isysmon.h
+ivec.h
+iwamreg.h
+jobapi.h
+kbdmou.h
+kcom.h
+knownfolders.h
+ksdebug.h
+ksguid.h
+ks.h
+ksmedia.h
+ksproxy.h
+ksuuids.h
+ktmtypes.h
+ktmw32.h
+kxia64.h
+l2cmn.h
+libgen.h
+libloaderapi.h
+limits.h
+lmaccess.h
+lmalert.h
+lmapibuf.h
+lmat.h
+lmaudit.h
+lmconfig.h
+lmcons.h
+lmdfs.h
+lmerr.h
+lmerrlog.h
+lm.h
+lmjoin.h
+lmmsg.h
+lmon.h
+lmremutl.h
+lmrepl.h
+lmserver.h
+lmshare.h
+lmsname.h
+lmstats.h
+lmsvc.h
+lmuseflg.h
+lmuse.h
+lmwksta.h
+loadperf.h
+locale.h
+locationapi.h
+locking.h
+lpmapi.h
+lzexpand.h
+madcapcl.h
+magnification.h
+mailmsgprops.h
+malloc.h
+manipulations.h
+mapicode.h
+mapidbg.h
+mapidefs.h
+mapiform.h
+mapiguid.h
+mapi.h
+mapihook.h
+mapinls.h
+mapioid.h
+mapispi.h
+mapitags.h
+mapiutil.h
+mapival.h
+mapiwin.h
+mapiwz.h
+mapix.h
+math.h
+mbctype.h
+mbstring.h
+mbstring_s.h
+mcd.h
+mce.h
+mciavi.h
+mcx.h
+mdcommsg.h
+mddefw.h
+mdhcp.h
+mdmsg.h
+mediaerr.h
+mediaobj.h
+medparam.h
+mem.h
+memoryapi.h
+memory.h
+mergemod.h
+mfapi.h
+mferror.h
+mfidl.h
+mfmp2dlna.h
+mfobjects.h
+mfplay.h
+mfreadwrite.h
+mftransform.h
+mgm.h
+mgmtapi.h
+midles.h
+mimedisp.h
+mimeinfo.h
+_mingw_ddk.h
+_mingw_directx.h
+_mingw_dxhelper.h
+_mingw_mac.h
+_mingw_off_t.h
+_mingw_print_pop.h
+_mingw_print_push.h
+_mingw_secapi.h
+_mingw_stat64.h
+_mingw_stdarg.h
+_mingw_unicode.h
+miniport.h
+minitape.h
+minmax.h
+minwinbase.h
+minwindef.h
+mlang.h
+mmc.h
+mmcobj.h
+mmdeviceapi.h
+mmreg.h
+mmstream.h
+mmsystem.h
+mobsync.h
+module.h
+moniker.h
+mountdev.h
+mountmgr.h
+mpeg2bits.h
+mpeg2data.h
+mpeg2psiparser.h
+mpeg2structs.h
+mprapi.h
+mprerror.h
+mq.h
+mqmail.h
+mqoai.h
+msacmdlg.h
+msacm.h
+msado15.h
+msasn1.h
+msber.h
+mscat.h
+mschapp.h
+msclus.h
+mscoree.h
+msctf.h
+msctfmonitorapi.h
+msdadc.h
+msdaguid.h
+msdaipper.h
+msdaipp.h
+msdaora.h
+msdaosp.h
+msdasc.h
+msdasql.h
+msdatsrc.h
+msdrmdefs.h
+msdrm.h
+msdshape.h
+msfs.h
+mshtmcid.h
+mshtmdid.h
+mshtmhst.h
+mshtmlc.h
+mshtml.h
+msidefs.h
+msi.h
+msimcntl.h
+msimcsdk.h
+msinkaut.h
+msiquery.h
+msoav.h
+msopc.h
+mspab.h
+mspaddr.h
+mspbase.h
+mspcall.h
+mspcoll.h
+mspenum.h
+msp.h
+msplog.h
+msports.h
+mspst.h
+mspstrm.h
+mspterm.h
+mspthrd.h
+msptrmac.h
+msptrmar.h
+msptrmvc.h
+msputils.h
+msrdc.h
+msremote.h
+mssip.h
+msstkppg.h
+mstask.h
+mstcpip.h
+msterr.h
+mswsock.h
+msxml2did.h
+msxml2.h
+msxmldid.h
+msxml.h
+mtsadmin.h
+mtsevents.h
+mtsgrp.h
+mtxadmin.h
+mtxattr.h
+mtxdm.h
+mtx.h
+muiload.h
+multimon.h
+multinfo.h
+mxdc.h
+namedpipeapi.h
+namespaceapi.h
+napcertrelyingparty.h
+napcommon.h
+napenforcementclient.h
+napmanagement.h
+napmicrosoftvendorids.h
+napprotocol.h
+napservermanagement.h
+napsystemhealthagent.h
+napsystemhealthvalidator.h
+naptypes.h
+naputil.h
+nb30.h
+ncrypt.h
+ndattrib.h
+ndfapi.h
+ndhelper.h
+ndisguid.h
+ndis.h
+ndistapi.h
+ndiswan.h
+ndkinfo.h
+ndr64types.h
+ndrtypes.h
+netcon.h
+neterr.h
+netevent.h
+netfw.h
+netioapi.h
+netlistmgr.h
+netmon.h
+netpnp.h
+netprov.h
+nettypes.h
+newapis.h
+newdev.h
+new.h
+nldef.h
+nmsupp.h
+npapi.h
+nsemail.h
+nspapi.h
+ntagp.h
+ntdd1394.h
+ntdd8042.h
+ntddbeep.h
+ntddcdrm.h
+ntddcdvd.h
+ntddchgr.h
+ntdddisk.h
+ntddft.h
+ntddkbd.h
+ntddk.h
+ntddmmc.h
+ntddmodm.h
+ntddmou.h
+ntddndis.h
+ntddpar.h
+ntddpcm.h
+ntddpsch.h
+ntddscsi.h
+ntddser.h
+ntddsnd.h
+ntddstor.h
+ntddtape.h
+ntddtdi.h
+ntddvdeo.h
+ntddvol.h
+ntdef.h
+ntdsapi.h
+ntdsbcli.h
+ntdsbmsg.h
+ntgdi.h
+ntifs.h
+ntimage.h
+ntiologc.h
+ntldap.h
+ntmsapi.h
+ntmsmli.h
+ntnls.h
+ntpoapi.h
+ntquery.h
+ntsdexts.h
+ntsecapi.h
+ntsecpkg.h
+ntstatus.h
+ntstrsafe.h
+ntverp.h
+oaidl.h
+objbase.h
+objectarray.h
+objerror.h
+objidlbase.h
+objidl.h
+objsafe.h
+objsel.h
+ocidl.h
+ocmm.h
+odbcinst.h
+odbcss.h
+ole2.h
+ole2ver.h
+oleacc.h
+oleauto.h
+olectl.h
+olectlid.h
+oledbdep.h
+oledberr.h
+oledbguid.h
+oledb.h
+oledlg.h
+ole.h
+oleidl.h
+oletx2xa.h
+opmapi.h
+oprghdlr.h
+optary.h
+p2p.h
+packoff.h
+packon.h
+parallel.h
+param.h
+parser.h
+patchapi.h
+patchwiz.h
+pathcch.h
+pbt.h
+pchannel.h
+pciprop.h
+pcrt32.h
+pdh.h
+pdhmsg.h
+penwin.h
+perflib.h
+perhist.h
+persist.h
+pfhook.h
+pgobootrun.h
+physicalmonitorenumerationapi.h
+pla.h
+pnrpdef.h
+pnrpns.h
+poclass.h
+polarity.h
+_pop_BOOL.h
+poppack.h
+portabledeviceconnectapi.h
+portabledevicetypes.h
+portcls.h
+powrprof.h
+prnasnot.h
+prntfont.h
+processenv.h
+process.h
+processthreadsapi.h
+processtopologyapi.h
+profileapi.h
+profile.h
+profinfo.h
+propidl.h
+propkeydef.h
+propkey.h
+propsys.h
+propvarutil.h
+prsht.h
+psapi.h
+pshpack1.h
+pshpack2.h
+pshpack4.h
+pshpack8.h
+pshpck16.h
+pstore.h
+pthread_signal.h
+pthread_time.h
+pthread_unistd.h
+punknown.h
+_push_BOOL.h
+qedit.h
+qmgr.h
+qnetwork.h
+qos2.h
+qos.h
+qosname.h
+qospol.h
+qossp.h
+rasdlg.h
+raseapif.h
+raserror.h
+ras.h
+rassapi.h
+rasshost.h
+ratings.h
+rdpencomapi.h
+realtimeapiset.h
+reason.h
+recguids.h
+reconcil.h
+regbag.h
+regstr.h
+rend.h
+resapi.h
+restartmanager.h
+richedit.h
+richole.h
+rkeysvcc.h
+rnderr.h
+roapi.h
+routprot.h
+rpcasync.h
+rpcdce.h
+rpcdcep.h
+rpc.h
+rpcndr.h
+rpcnsi.h
+rpcnsip.h
+rpcnterr.h
+rpcproxy.h
+rpcsal.h
+rpcssl.h
+rrascfg.h
+rtcapi.h
+rtccore.h
+rtcerr.h
+rtinfo.h
+rtm.h
+rtmv2.h
+rtutils.h
+sal.h
+sapi51.h
+sapi53.h
+sapi54.h
+sapi.h
+sas.h
+sbe.h
+scarddat.h
+scarderr.h
+scardmgr.h
+scardsrv.h
+scardssp.h
+scesvc.h
+schannel.h
+schedule.h
+schemadef.h
+schnlsp.h
+scode.h
+scrnsave.h
+scrptids.h
+scsi.h
+scsiscan.h
+scsiwmi.h
+sddl.h
+sdkddkver.h
+sdoias.h
+sdpblb.h
+sdperr.h
+search.h
+search_s.h
+secext.h
+securityappcontainer.h
+securitybaseapi.h
+security.h
+sehmap.h
+sensapi.h
+sensevts.h
+sens.h
+sensorsapi.h
+sensors.h
+servprov.h
+setjmpex.h
+setjmp.h
+setupapi.h
+sfc.h
+shappmgr.h
+share.h
+shdeprecated.h
+shdispid.h
+shellapi.h
+sherrors.h
+shfolder.h
+shldisp.h
+shlguid.h
+shlobj.h
+shlwapi.h
+shobjidl.h
+shtypes.h
+signal.h
+simpdata.h
+simpdc.h
+sipbase.h
+sisbkup.h
+slerror.h
+slpublic.h
+smbus.h
+smpab.h
+smpms.h
+smpxp.h
+smtpguid.h
+smx.h
+snmp.h
+_socket_types.h
+softpub.h
+specstrings.h
+sperror.h
+sphelper.h
+sporder.h
+sql_1.h
+sqlext.h
+sql.h
+sqloledb.h
+sqltypes.h
+sqlucode.h
+srb.h
+srrestoreptapi.h
+srv.h
+sspguid.h
+sspi.h
+sspserr.h
+sspsidl.h
+stat.h
+stdarg.h
+stddef.h
+stdexcpt.h
+stdint.h
+stdio.h
+stdio_s.h
+stdlib.h
+stdlib_s.h
+stdunk.h
+stierr.h
+sti.h
+stireg.h
+stllock.h
+stm.h
+storage.h
+storduid.h
+storport.h
+storprop.h
+stralign.h
+stralign_s.h
+stringapiset.h
+string.h
+string_s.h
+strings.h
+strmif.h
+strmini.h
+strsafe.h
+structuredquerycondition.h
+subauth.h
+subsmgr.h
+svcguid.h
+svrapi.h
+swenum.h
+synchapi.h
+sysinfoapi.h
+syslimits.h
+systemtopologyapi.h
+t2embapi.h
+tabflicks.h
+tapi3cc.h
+tapi3ds.h
+tapi3err.h
+tapi3.h
+tapi3if.h
+tapi.h
+taskschd.h
+tbs.h
+tcerror.h
+tcguid.h
+tchar.h
+tchar_s.h
+tcpestats.h
+tcpmib.h
+tdh.h
+tdi.h
+tdiinfo.h
+tdikrnl.h
+tdistat.h
+termmgr.h
+textserv.h
+textstor.h
+threadpoolapiset.h
+threadpoollegacyapiset.h
+timeb.h
+timeb_s.h
+time.h
+timeprov.h
+_timeval.h
+timezoneapi.h
+tlbref.h
+tlhelp32.h
+tlogstg.h
+tmschema.h
+tnef.h
+tom.h
+tpcshrd.h
+traffic.h
+transact.h
+triedcid.h
+triediid.h
+triedit.h
+tsattrs.h
+tspi.h
+tssbx.h
+tsuserex.h
+tuner.h
+tvout.h
+txcoord.h
+txctx.h
+txdtc.h
+txfw32.h
+typeinfo.h
+types.h
+uastrfnc.h
+uchar.h
+udpmib.h
+uianimation.h
+uiautomationclient.h
+uiautomationcoreapi.h
+uiautomationcore.h
+uiautomation.h
+uiviewsettingsinterop.h
+umx.h
+unistd.h
+unknown.h
+unknwnbase.h
+unknwn.h
+upssvc.h
+urlhist.h
+urlmon.h
+usb100.h
+usb200.h
+usbbusif.h
+usbcamdi.h
+usbdi.h
+usbdlib.h
+usbdrivr.h
+usb.h
+usbioctl.h
+usbiodef.h
+usbkern.h
+usbprint.h
+usbprotocoldefs.h
+usbrpmif.h
+usbscan.h
+usbspec.h
+usbstorioctl.h
+usbuser.h
+userenv.h
+usp10.h
+utilapiset.h
+utime.h
+uuids.h
+uxtheme.h
+vadefs.h
+varargs.h
+_varenum.h
+vcr.h
+vdmdbg.h
+vds.h
+vdslun.h
+versionhelpers.h
+vfw.h
+vfwmsgs.h
+videoagp.h
+video.h
+virtdisk.h
+vmr9.h
+vsadmin.h
+vsbackup.h
+vsmgmt.h
+vsprov.h
+vss.h
+vsstyle.h
+vssym32.h
+vswriter.h
+w32api.h
+wabapi.h
+wabcode.h
+wabdefs.h
+wab.h
+wabiab.h
+wabmem.h
+wabnot.h
+wabtags.h
+wabutil.h
+wbemads.h
+wbemcli.h
+wbemdisp.h
+wbemidl.h
+wbemprov.h
+wbemtran.h
+wchar.h
+wchar_s.h
+wcmconfig.h
+wcsplugin.h
+wct.h
+wctype.h
+wdmguid.h
+wdm.h
+wdsbp.h
+wdsclientapi.h
+wdspxe.h
+wdstci.h
+wdstpdi.h
+wdstptmgmt.h
+werapi.h
+wfext.h
+wglext.h
+wiadef.h
+wiadevd.h
+wia.h
+wiavideo.h
+winable.h
+winapifamily.h
+winbase.h
+winber.h
+wincodec.h
+wincon.h
+wincred.h
+wincrypt.h
+winddi.h
+winddiui.h
+windef.h
+windns.h
+windot11.h
+windows.foundation.h
+windows.h
+windows.security.cryptography.h
+windows.storage.h
+windows.storage.streams.h
+windows.system.threading.h
+windowsx.h
+winefs.h
+winerror.h
+winevt.h
+wingdi.h
+winhttp.h
+wininet.h
+winineti.h
+winioctl.h
+winldap.h
+winnetwk.h
+winnls32.h
+winnls.h
+winnt.h
+winperf.h
+winreg.h
+winresrc.h
+winsafer.h
+winsatcominterfacei.h
+winscard.h
+winsdkver.h
+winsmcrd.h
+winsnmp.h
+winsock2.h
+winsock.h
+winsplp.h
+winspool.h
+winstring.h
+winsvc.h
+winsxs.h
+winsync.h
+winternl.h
+wintrust.h
+winusb.h
+winusbio.h
+winuser.h
+winver.h
+winwlx.h
+wlanapi.h
+wlanihvtypes.h
+wlantypes.h
+wmcodecdsp.h
+wmcontainer.h
+wmdrmsdk.h
+wmiatlprov.h
+wmidata.h
+wmilib.h
+wmistr.h
+wmiutils.h
+wmsbuffer.h
+wmsdkidl.h
+wnnc.h
+wow64apiset.h
+wownt16.h
+wownt32.h
+wpapi.h
+wpapimsg.h
+wpcapi.h
+wpcevent.h
+wpcrsmsg.h
+wpftpmsg.h
+wppstmsg.h
+wpspihlp.h
+wptypes.h
+wpwizmsg.h
+wrl.h
+_ws1_undef.h
+ws2atm.h
+ws2bth.h
+ws2def.h
+ws2dnet.h
+ws2ipdef.h
+ws2san.h
+ws2spi.h
+ws2tcpip.h
+_wsadata.h
+_wsa_errnos.h
+wsdapi.h
+wsdattachment.h
+wsdbase.h
+wsdclient.h
+wsddisco.h
+wsdhost.h
+wsdtypes.h
+wsdutil.h
+wsdxmldom.h
+wsdxml.h
+wshisotp.h
+wsipv6ok.h
+wsipx.h
+wsmandisp.h
+wsman.h
+wsnetbs.h
+wsnwlink.h
+wspiapi.h
+wsrm.h
+wsvns.h
+wtsapi32.h
+wtypesbase.h
+wtypes.h
+xa.h
+xcmcext.h
+xcmc.h
+xcmcmsx2.h
+xcmcmsxt.h
+xenroll.h
+xfilter.h
+xinput.h
+xlocinfo.h
+xmath.h
+_xmitfile.h
+xmldomdid.h
+xmldsodid.h
+xmllite.h
+xmltrnsf.h
+xolehlp.h
+xpsdigitalsignature.h
+xpsobjectmodel_1.h
+xpsobjectmodel.h
+xpsprint.h
+xpsrassvc.h
+ymath.h
+yvals.h
+zmouse.h
new file mode 100644
--- /dev/null
+++ b/tools/lint/mingw-capitalization.yml
@@ -0,0 +1,27 @@
+---
+mingw-capitalization:
+    description: >
+      "A Windows include file is not lowercase, and may break the MinGW build"
+    extensions: ['h', 'cpp', 'cc', 'c']
+    include: ['.']
+    exclude:
+        # We do not compile WebRTC with MinGW yet
+        - media/webrtc
+        - media/mtransport/third_party/nrappkit/src/util/util.c
+        - gfx/angle/checkout/src/common/tls.cpp
+        - gfx/cairo/cairo/src/cairo-atomic-private.h
+        - gfx/harfbuzz/src/hb-directwrite.cc
+        - gfx/skia/skia/src/views/win/SkOSWindow_win.cpp
+        - gfx/skia/skia/src/xps/SkXPSDevice.cpp
+        - gfx/skia/skia/src/xps/SkXPSDevice.h
+        - gfx/skia/skia/src/xps/SkXPSDocument.h
+        - ipc/chromium/src/third_party/libevent
+        - modules/freetype2/builds/mac/ftmac.c
+        - other-licenses/7zstub
+        - security/nss/nss-tool/common/util.cc
+        - toolkit/crashreporter/google-breakpad/src/tools/windows
+        - toolkit/crashreporter/google-breakpad/src/common/windows
+        - third_party/python/psutil/psutil
+    type: external
+    level: warning
+    payload: cpp.mingw-capitalization:lint