Skip to content

Commit

Permalink
xmldocs edits; adjusted RequiredLibrary/RequiredHost attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed Apr 21, 2021
1 parent d7e914e commit bd073dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Expand Up @@ -9,11 +9,11 @@
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
{
/// <summary>
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules.
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls implicitly referring to ActiveSheet.
/// </summary>
/// <reference name="Excel" />
/// <why>
/// Implicit references to the active worksheet rarely mean to be working with *whatever worksheet is currently active*.
/// Implicit references to the active worksheet (ActiveSheet) rarely mean to be working with *whatever worksheet is currently active*.
/// By explicitly qualifying these member calls with a specific Worksheet object, the assumptions are removed, the code
/// is more robust, and will be less likely to throw run-time error 1004 or produce unexpected results
/// when the active sheet isn't the expected one.
Expand Down
Expand Up @@ -13,12 +13,12 @@
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
{
/// <summary>
/// Locates unqualified Workbook.Worksheets/Sheets/Names member calls inside workbook document modules that implicitly refer to the containing workbook.
/// Locates unqualified Workbook.Worksheets/Sheets/Names member calls inside workbook document modules, that implicitly refer to the host workbook.
/// </summary>
/// <reference name="Excel" />
/// <hostApp name="Excel" />
/// <why>
/// Implicit references inside a workbook document module can be mistakes for implicit references to the active workbook, which is the behavior in all other modules
/// By explicitly qualifying these member calls with Me, the ambiguity can be resolved.
/// Implicit references inside a workbook document module can easily be mistaken for implicit references to the active workbook (ActiveWorkbook), which is the behavior in all other module types.
/// By explicitly qualifying these member calls with 'Me', the ambiguity can be resolved. If the intent is to actually refer to the active workbook, qualify with 'ActiveWorkbook' to prevent a bug.
/// </why>
/// <example hasResult="true">
/// <module name="ThisWorkbook" type="Document Module">
Expand All @@ -40,7 +40,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// ]]>
/// </module>
/// </example>
[RequiredLibrary("Excel")]
[RequiredHost("Excel")]
internal sealed class ImplicitContainingWorkbookReferenceInspection : ImplicitWorkbookReferenceInspectionBase
{
public ImplicitContainingWorkbookReferenceInspection(IDeclarationFinderProvider declarationFinderProvider)
Expand Down
Expand Up @@ -10,12 +10,12 @@
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
{
/// <summary>
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules that implicitly refer to the containing sheet.
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules, that implicitly refer to the containing sheet component.
/// </summary>
/// <reference name="Excel" />
/// <hostApp name="Excel" />
/// <why>
/// Implicit references inside a worksheet document module can be mistakes for implicit references to the active worksheet, which is the behavior in all other places.
/// By explicitly qualifying these member calls with Me, the ambiguity can be resolved.
/// Implicit references inside a worksheet document module can easily be mistaken for implicit references to the active worksheet (ActiveSheet), which is the behavior in all other module types.
/// By explicitly qualifying these member calls with 'Me', the ambiguity can be resolved. If the intent is to refer to the active worksheet, qualify with 'ActiveSheet' to prevent a bug.
/// </why>
/// <example hasResult="true">
/// <module name="Sheet1" type="Document Module">
Expand All @@ -37,7 +37,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// ]]>
/// </module>
/// </example>
[RequiredLibrary("Excel")]
[RequiredHost("Excel")]
internal sealed class ImplicitContainingWorksheetReferenceInspection : ImplicitSheetReferenceInspectionBase
{
public ImplicitContainingWorksheetReferenceInspection(IDeclarationFinderProvider declarationFinderProvider)
Expand Down

0 comments on commit bd073dd

Please sign in to comment.