Changeset 175628 in webkit


Ignore:
Timestamp:
Nov 5, 2014 10:43:30 AM (9 years ago)
Author:
jonowells@apple.com
Message:

Web Inspector: Add infrastructure for eslint based static analyzer
https://bugs.webkit.org/show_bug.cgi?id=137890

Reviewed by Timothy Hatcher.

Adding a manager to analyze source code, return warnings (AnalyzerMessages), and cache warnings.

  • UserInterface/Base/Main.js: Create analyzerManager singleton.
  • UserInterface/Controllers/AnalyzerManager.js: Added.

(WebInspector.AnalyzerManager):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
(set WebInspector.AnalyzerManager.prototype.set get sourceCodeCanBeAnalyzed):
(set WebInspector.AnalyzerManager.prototype._handleSourceCodeContentDidChange):

  • UserInterface/Main.html: Add new files.
  • UserInterface/Models/AnalyzerMessage.js: Added.

(WebInspector.AnalyzerMessage):
(WebInspector.AnalyzerMessage.prototype.get sourceCodeLocation):
(WebInspector.AnalyzerMessage.prototype.get sourceCode):
(WebInspector.AnalyzerMessage.prototype.get text):
(WebInspector.AnalyzerMessage.prototype.get ruleIdentifier):

  • UserInterface/Models/SourceCode.js: Added call to WebInspector.Object.addConstructorFunctions().
Location:
trunk/Source/WebInspectorUI
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r175599 r175628  
     12014-11-05  Jonathan Wells  <jonowells@apple.com>
     2
     3        Web Inspector: Add infrastructure for eslint based static analyzer
     4        https://bugs.webkit.org/show_bug.cgi?id=137890
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Adding a manager to analyze source code, return warnings (AnalyzerMessages), and cache warnings.
     9
     10        * UserInterface/Base/Main.js: Create analyzerManager singleton.
     11        * UserInterface/Controllers/AnalyzerManager.js: Added.
     12        (WebInspector.AnalyzerManager):
     13        (set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
     14        (set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
     15        (set WebInspector.AnalyzerManager.prototype.set get sourceCodeCanBeAnalyzed):
     16        (set WebInspector.AnalyzerManager.prototype._handleSourceCodeContentDidChange):
     17        * UserInterface/Main.html: Add new files.
     18        * UserInterface/Models/AnalyzerMessage.js: Added.
     19        (WebInspector.AnalyzerMessage):
     20        (WebInspector.AnalyzerMessage.prototype.get sourceCodeLocation):
     21        (WebInspector.AnalyzerMessage.prototype.get sourceCode):
     22        (WebInspector.AnalyzerMessage.prototype.get text):
     23        (WebInspector.AnalyzerMessage.prototype.get ruleIdentifier):
     24        * UserInterface/Models/SourceCode.js: Added call to WebInspector.Object.addConstructorFunctions().
     25
    1262014-11-04  Joseph Pecoraro  <pecoraro@apple.com>
    227
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r175478 r175628  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    101101    this.logManager = new WebInspector.LogManager;
    102102    this.issueManager = new WebInspector.IssueManager;
     103    this.analyzerManager = new WebInspector.AnalyzerManager;
    103104    this.runtimeManager = new WebInspector.RuntimeManager;
    104105    this.applicationCacheManager = new WebInspector.ApplicationCacheManager;
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r175588 r175628  
    176176
    177177    <script src="External/Esprima/esprima.js"></script>
     178    <script src="External/ESLint/eslint.js"></script>
    178179
    179180    <script src="Protocol/ApplicationCacheObserver.js"></script>
     
    203204    <script src="Models/TimelineRecord.js"></script>
    204205
     206    <script src="Models/AnalyzerMessage.js"></script>
    205207    <script src="Models/ApplicationCacheFrame.js"></script>
    206208    <script src="Models/ApplicationCacheManifest.js"></script>
     
    459461    <script src="Controllers/CodeMirrorEditingController.js"></script>
    460462
     463    <script src="Controllers/AnalyzerManager.js"></script>
    461464    <script src="Controllers/ApplicationCacheManager.js"></script>
    462465    <script src="Controllers/BranchManager.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js

    r171790 r175628  
    3737};
    3838
     39WebInspector.Object.addConstructorFunctions(WebInspector.SourceCode);
     40
    3941WebInspector.SourceCode.Event = {
    4042    ContentDidChange: "source-code-content-did-change",
Note: See TracChangeset for help on using the changeset viewer.