homeHome  |   contactContact  |   sitemapSearch
 
 

 


 

Frequently Asked Questions

What is the SP-Lint+?
The SP-Lint+ is a development tool providing a way to verify the consistency and completeness of SharePoint feature solutions.

Who is developing SP-Lint+?
SP-Lint+ is being developed and maintained by a principal partner of Stratton & Associates, Ltd.

Why was SP-Lint+ created?
SP-Lint+ was created as a result of taking a week long developer-oriented SharePoint training course which had a number of labs where the students were assigned programming tasks to perform. The very first lab resulted in creating a relatively simple SharePoint feature where the icon associated with the feature was not being correctly packaged and/or displayed when completed by the instructor. During a session break, the issue was identified and the feature was deployed correctly. Thus leading to the the idea of producing a tool which could identify these issues as a post-build step.

Does SP-Lint+ modify my code?
NO. by default SP-Lint+ does a static analysis of your code and generates a report from this analysis.

Can SP-Lint+ generate missing project artifacts?
There are command line options that can be set to configure SP-Lint+ to generate a .DDF and/or manifest file based on the results of its analysis. Since you supply the path to these generated files, you may either include them in your solution or in a separate directory for review.

Note: The code generation options are currently under development and while they are included in this release they are expected to be more robust shortly.

What is SP-Lint+ looking for in my project?
SP-Lint+ contains a number of validation strategies that it applies to your project. There are approximately x validators which compare the contents of the various xml files which can be associated with a features against a set of valid entries. Additionally SP-Lint+ will identify configuration attributes which are inconsistent with one another. SP-Lint+ will identify obsolete or deprecated properties. current development revolves around comparing a projects artifacts and their existence on in the DDF file.

How do I run SP-Lint+?
The SP-Lint+ is a command line utility which can be configured to execute as a post-build step in your feature project or as an MSBuild command on your build or continuous integration (Cruise Control) machine.

What does a typical post-build command line look like for SP-Lint+?
The following command instructs SP-Lint+ to process the project found at the project directory and not report any validations that 'pass', 'deprecated' or 'warnings'.
/p $(ProjectDir) /R -P-D-W

How do I identify a feature to have SP-Lint+ analyze?
The SP-Lint+ utility requires a path to the root of the project that you want the tool to analyze or a path specifically to the feature manifest.

How does SP-Lint+ report its findings?
SP-Lint+ defaults to a simple text output format which identifies its processing status and results. SP-Lint+ can also be configured to output results in an xml document format. SP-Lint+ can be configured to output either format to a file in directory you specify.

Do I see the SP-Lint+ results in the output window of visual studio?
Yes, exactly. Simply provide a post-build instruction as identified above.

Can I configure what SP-Lint+ reports?
Yes- There are different categories of validators which can be included or excluded in the output report, these include:

  • O = Obsolete elements or attributes
  • P = Passed validation
  • R = Reserved attributes
  • D = Deployed components or resources
  • W = Warning, not following a recommendation or convention

    Can I exclude particular validation tests?
    Yes- you can identify validations which you don't want to report and identify their id's as a collection in the SP-Lint+ environment.xml file.

    What does a typical validation report look like?
    The following output demonstrates an SP-Lint+ 'run' when all validation categories are reported in a verbose text mode.

    Starting validation processing...
    Begin feature processing: C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\feature.xml
    Passed: FID007 Determine if the value of the ActiveOnDefault attribute is valid.
    Passed: FID008 Determine if the value of the AlwaysForceInstall attribute is valid.
    Passed: FID009 Determine if the value of the AutoActivateInCentralAdmin attribute is valid.
    Passed: FID001 Determine if the value of the Hidden attribute is valid.
    Passed: FID002 Determine if the value of the feature id is defined and valid.
    Failed: FID003 Determine if the image associated with the ImageUrl attribute has been deployed.
     Result: Feature ImageUrl is not deployed:
    Passed: FID004 Determine if the image associated with the ImageUrl for the feature has been found in the source.
    Passed: FID005 Determine if the Scope attribute associated with a feature is valid.
    Passed: FID014 Determine if the assembly identified by the ReceiverAssembly attribute has been deployed to the GAC.
    Passed: FID012 Determine if the PublicKeyToken component of the ReceiverAssembly attribute is valid.
    Passed: FID007 Determine if the value of the ActiveOnDefault attribute is valid.
    Passed: FID006 Determine if the receiver class is a valid source target in the feature.
    Passed: FID010 Determine if the DefaultResourceFile is a valid source target of the feature.
    Failed: FID011 Determine if the DefaultResourceFile associated with the feature has been deployed.
     Result: The DefaultResourceFile for the feature is not deployed: Begin element processing: C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\elements.xml
    Start CustomAction: SiteActionsToolbar
    Passed: CAID004 Determine if the ContentTypeId attribute is valid.
    Passed: CAID003 Determine if the ControlAssembly attribute for the element is valid.
    Passed: CAID001 Determine if the assembly identified by the ControlAssembly attribute has been deployed to the GAC.
    Passed: CAID008 Determine if the Id attribute is valid.
    Passed: CAID006 Determine if the ControlClass and ControlSrc attributes are valid.
    Passed: CAID009 Determine if the GroupId attribute is valid.
    Warning : CAID008 Determine if the Id attribute is valid.
     Result: The Id attribute is typically defined as a GUID.
    Passed: CAID016 Determine if the ImageUrl source is valid.
    Failed: CAID017 Determine if the resource specified by the ImageUrl is deployed.
     Result: The image specified by the ImageUrl attribute for this resource is not deployed.
    Passed: CAID007 Determine if the Location attribute is valid.
    Passed: CAID011 Determine if the RegistrationId is valid.
    Passed: CAID005 Determine if the RegistrationType attribute is valid.
    Passed: CAID016 Determine if RequiresSiteAdministrator is valid.
    Passed: CAID010 Determine if the Rights attribute is valid.
    Passed: CAID013 Determine if the Sequence attribute is valid.
    Passed: CAID015 Determine if the ShowInLists attribute is valid.
    Passed: CAID014 Determine if ShowInreadOnlyContentTypes is valid.
    Passed: CAID012 Determine if the ShowInSealedContentTypes attribute is valid.
    Passed: CAID002 Determine if the CustomAction specifies a Title as required.
    Start UrlActtion:
    Passed: CAURLID001 The Url attribute is required. Determine if it exists.
    End UrlAction
    End CustomAction
    Completed element processing.
    Completed feature processing.
    Begin feature processing: C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\feature.xml
    Passed: FID007 Determine if the value of the ActiveOnDefault attribute is valid.
    Passed: FID008 Determine if the value of the AlwaysForceInstall attribute is valid.
    Passed: FID009 Determine if the value of the AutoActivateInCentralAdmin attribute is valid.
    Passed: FID001 Determine if the value of the Hidden attribute is valid.
    Passed: FID002 Determine if the value of the feature id is defined and valid.
    Failed: FID003 Determine if the image associated with the ImageUrl attribute has been deployed.
     Result: Feature ImageUrl is not deployed:
    Passed: FID004 Determine if the image associated with the ImageUrl for the feature has been found in the source.
    Passed: FID005 Determine if the Scope attribute associated with a feature is valid.
    Passed: FID014 Determine if the assembly identified by the ReceiverAssembly attribute has been deployed to the GAC.
    Passed: FID012 Determine if the PublicKeyToken component of the ReceiverAssembly attribute is valid.
    Passed: FID007 Determine if the value of the ActiveOnDefault attribute is valid.
    Passed: FID006 Determine if the receiver class is a valid source target in the feature.
    Passed: FID010 Determine if the DefaultResourceFile is a valid source target of the feature.
    Failed: FID011 Determine if the DefaultResourceFile associated with the feature has been deployed.
     Result: The DefaultResourceFile for the feature is not deployed: Begin element processing: C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\elements.xml
    Start CustomAction: SiteActionsToolbar
    Passed: CAID004 Determine if the ContentTypeId attribute is valid.
    Passed: CAID003 Determine if the ControlAssembly attribute for the element is valid.
    Passed: CAID001 Determine if the assembly identified by the ControlAssembly attribute has been deployed to the GAC.
    Passed: CAID008 Determine if the Id attribute is valid.
    Passed: CAID006 Determine if the ControlClass and ControlSrc attributes are valid.
    Passed: CAID009 Determine if the GroupId attribute is valid.
    Warning: CAID008 Determine if the Id attribute is valid.
     Result: The Id attribute is typically defined as a GUID.
    Passed: CAID016 Determine if the ImageUrl source is valid.
    Failed: CAID017 Determine if the resource specified by the ImageUrl is deployed.
     Result: The image specified by the ImageUrl attribute for this resource is not deployed.
    Passed: CAID007 Determine if the Location attribute is valid.
    Passed: CAID011 Determine if the RegistrationId is valid.
    Passed: CAID005 Determine if the RegistrationType attribute is valid.
    Passed: CAID016 Determine if RequiresSiteAdministrator is valid.
    Passed: CAID010 Determine if the Rights attribute is valid.
    Passed: CAID013 Determine if the Sequence attribute is valid.
    Passed: CAID015 Determine if the ShowInLists attribute is valid.
    Passed: CAID014 Determine if ShowInreadOnlyContentTypes is valid.
    Passed: CAID012 Determine if the ShowInSealedContentTypes attribute is valid.
    Passed: CAID002 Determine if the CustomAction specifies a Title as required.
    Start UrlActtion:
    Passed: CAURLID001 The Url attribute is required. Determine if it exists.
    End UrlAction
    End CustomAction
    Completed element processing.
    Completed feature processing.
    Validation Summary - 60 Passed, 1 Warnings, 0 Errors, 0 Obsolete, 0 Reserved, 0 Ignored, 2 Deployment

    How does a report appear when formatted in xml?
    The following output demonstrates an SP-Lint+ 'run' when all validation categories are reported as an XML file.

    <?xml version="1.0" encoding="utf-8"?>
    <Feature filespec="C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\feature.xml">
      <Validation Status="failed" Validation="Determine if the value of the ActiveOnDefault attribute is valid." ValidationId="FID007" />
      <Validation Status="failed" Validation="Determine if the value of the AlwaysForceInstall attribute is valid." ValidationId="FID008" />
      <Validation Status="passed" Validation="Determine if the value of the Hidden attribute is valid." ValidationId="FID001" />
      <Validation Status="passed" Validation="Determine if the value of the feature id is defined and valid."   ValidationId="FID002" />
      <Validation Status="failed" Validation="Determine if the image associated with the ImageUrl attribute has been deployed." ValidationId="FID003" />
      <Validation Status="passed" Validation="Determine if the image associated with the ImageUrl for the feature has been found in the source." ValidationId="FID004" />
      <Validation Status="passed" Validation="Determine if the Scope attribute associated with a feature is valid." ValidationId="FID005" />
      <Validation Status="failed" Validation="Determine if the assembly identified by the ReceiverAssembly attribute has been deployed to the GAC." ValidationId="FID014" />
      <Validation Status="passed" Validation="Determine if the PublicKeyToken component of the ReceiverAssembly attribute is valid." ValidationId="FID012" />
      <Validation Status="failed" Validation="Determine if the value of the ActiveOnDefault attribute is valid." ValidationId="FID007" />
      <Validation Status="passed" Validation="Determine if the receiver class is a valid source target in the feature." ValidationId="FID006" />
      <Validation Status="failed" Validation="Determine if the DefaultResourceFile is a valid source target of the feature." ValidationId="FID010" />
      <Validation Status="failed" Validation="Determine if the DefaultResourceFile associated with the feature has been deployed." ValidationId="FID011" />
      <Element filespec="C:\Projects\Features\FirstFeature\TEMPLATE\FEATURES\Simple\elements.xml">
       
    <CustomAction Identifier="SiteActionsToolbar">
          <Validation Status="passed" Validation="Determine if the ContentTypeId attribute is valid." ValidationId="CAID004" />
          <Validation Status="passed" Validation="Determine if the ControlAssembly attribute for the element is valid." ValidationId="CAID003" />
          <Validation Status="passed" Validation="Determine if the assembly identified by the ControlAssembly attribute has been       deployed to the GAC." ValidationId="CAID001" />
          <Validation Status="passed" Validation="undefined" ValidationId="undefined" />
          <Validation Status="passed" Validation="Determine if the ControlClass and ControlSrc attributes are valid." ValidationId="CAID006" />
          <Validation Status="passed" Validation="Determine if the GroupId attribute is valid." ValidationId="CAID009" />
          <Validation Status="passed" Validation="Determine if the Id attribute is valid." ValidationId="CAID008" />
          <Validation Status="passed" Validation="Determine if the Location attribute is valid." ValidationId="CAID007" />
          <Validation Status="passed" Validation="Determine if the RegistrationType attribute is valid." ValidationId="CAID005" />
          <Validation Status="passed" Validation="Determine if the CustomAction specifies a Title as required." ValidationId="CAID002" />
         
    <UrlAction Identifier="">
            <Validation Status="passed" Validation="The Url attribute is required. Determine if it exists." ValidationId="CAURLID001" />
          </UrlAction>
        </CustomAction>
      </Element>
    </Feature>

    I want an example of the kinds of checking that SP-Lint+ can perform!
    Ok, sure, here's some validation that the utility can perform. If you are creating a feature that contains a custom action, you will need to include a ControlAssembly attribute. Any well formed attribute of this type must contain four components. The name, version, culture and public key token. (as follows) ControlAssembly="FirstFeature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b28a02315c3357c4"

    SSPV performs a number of tests on this attribute, including:
    - check to make sure that the four attribute components are defined
    - validate that the version is only numeric and properly formatted
    - verify that a class exists with the assembly name
    - report if the assembly exists in the GAC
    - compare the public key token to that which is registered for this GAC'd assembly

    What is the enviroment.xml file and what is it's purpose?
    The environment.xml file contains paths to the .NET strong name and the global assembly cache utilities. These utilities enable SP-Lint+ to perform some its validations. They are typically in the path of the visual studio or MSBuild environment where you execute SP-Lint+, but the explicit paths can be identified here. Also the environment file can contain a collection of SP-Lint+ validator identifies that you want to ignore.

    <Environment
      snexe="\sn.exe"
      gacutil="\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe" >
    <IgnoreFailedValidators>
      <IgnoreFailedValidatorId>FID009</IgnoreFailedValidatorId>
    </IgnoreFailedValidators>
    </Environment>


    How large is the SP-Lint+ utility and how much time does it take to analyze a project?
    The SP-Lint+ utility is just 400K in size and takes less than a second to run on a typical developer machine.

    What does SP-Lint+ cost?
    SP-Lint+ is a free downloadable trial. The product is in development and this Beta designator is expected to remain for the foreseeable future. Have you seen the economy lately? Hardworking SharePoint developers can certainly use a break in stocking their tool belts.

    How can I report issues that I find with SP-Lint+?
    There are a number of ways that you can reach the SP-Lint+ developers, send an email or post to the forum.

    How often will SP-Lint+ be updated?
    It is expected that a new (hopefully improved) version of SP-Lint+ will be available for download every 45 days.

     
       
    Copyright © 2009 Stratton & Associates, Ltd. .All Rights Reserved.