Code linting in dynamic application environments
AssigneeMicrosoft Technology Licensing, LLC
InventorsMichael Shinichiro Vaquier, Gergely Z. Kota
Life of this patent
Estimating the term…
Abstract
Systems, methods, and software are disclosed herein that support enhanced code linting. In an implementation, an application hosts a content object that is the subject of one or more scripts for automating tasks. A linter obtains an initial state of the content object from the application and generates a model that reflects the object's state. The linter also performs an analysis of the code statements with respect to the model. The linter may then enable or otherwise cause one or more results of the analysis to be displayed in a user interface to a code editor used for interacting with the scripts.
Claims20
A computing apparatus comprising:
- one or more computer readable storage media;
- one or more processors operatively coupled with the one or more computer readable storage media;
- and
- program instructions stored on the one or more computer readable storage media that, when executed by the one or more processors, direct the computing apparatus to at least:
- display, in a code editor interface, code statements of a script relating to a content object hosted by an application, wherein the content object comprises a spreadsheet workbook;
- obtain an initial state of the content object from the application, wherein the initial state identifies elements of the spreadsheet workbook;
- generate a model that reflects at least the initial state of the content object;
- perform an analysis of the code statements with respect to the model to identify a change to an element of the spreadsheet workbook implied by a code statement of the code statements;
- update the model to reflect the change to the element implied by the code statement;
- determine, based on the updated model, that the change to the element implied by the code statement will cause an error at a time of execution of the code statement;
- and
- display an indication of the error in the code editor interface.
One or more computer readable storage media having program instructions stored thereon that, when executed by one or more processors, direct a computing apparatus to at least:
- identify code statements in one or more scripts associated with a content object opened in an application, wherein the content object comprises a spreadsheet workbook;
- obtain an initial state of the content object from the application, wherein the initial state identifies elements of the spreadsheet workbook;
- generate a model that reflects at least the initial state of the content object;
- perform an analysis of the code statements with respect to the model to identify a change to an element of the spreadsheet workbook implied by a code statement of the code statements;
- update the model to reflect the change to the element implied by the code statement;
- determine, based on the updated model, that the change to the element implied by the code statement will cause an error at a time of execution of the code statement;
- and
- display an indication of the error in a user interface to the application.
A method of operating a computing device to analyze computer program code, the method comprising:
- the computing device enabling display of, in a user interface to code editor, code statements of a script relating to a content object hosted by an application, wherein the content object comprises a spreadsheet workbook;
- the computing device obtaining an initial state of the content object from the application, wherein the initial state identifies elements of the spreadsheet workbook;
- the computing device generating a model that reflects at least the initial state of the content object;
- the computing device analyzing the code statements with respect to the model to identify a change to an element of the spreadsheet workbook implied by a code statement of the code statements;
- the computing device updating the model to reflect the change to the element implied by the code statement;
- the computing device determining, based on the updated model, that the change to the element implied by the code statement will cause an error at a time of execution of the code statement;
- and
- the computing device enabling display of an indication of the error in the user interface to the code editor.
Dependencies are inferred from the claim text.