Skip to content

AA1200AvoidUsingStaticFields

David Arno edited this page Oct 3, 2016 · 2 revisions

Warning: this wiki page is auto-generated by the Arnolyzer solution-build process. Do not directly edit this page, as your changes will be lost on the next commit. To edit this page, please refer to Contributing to this project.

These wiki pages reflect the state of the project in development, per the last commit. For details of the latest release of the Arnolyzer Analysers, please see the Arnolyzer website.


AA1200 - Avoid Using Static Fields

Report code: AA1200-AvoidUsingStaticFields

Summary

Status Implemented
Description Static fields introduce global state and so should be avoided
Category Global State Analyzers
Enabled by default: Yes
Severity: Error

Cause

How to fix violations

There currently aren't any implemented code-fixes for this rule.

How to suppress violations

This rule can be suppressed using the following attributes:

[GlobalState]
A field or property annotated with GlobalState attribute is allowed to be static as it is explicitly declaring its need to be "globally" accessible.