Solhint

Solhint

Community Analyzer

Enforces the use of double or simple quotes as configured for string literals. Values must be 'single' or 'double' SOLHINT-W1017

Anti-pattern
Major

Enforces the use of double or simple quotes as configured for string literals. Values must be 'single' or 'double'.

Bad Practice

  1. Configured with single quotes

    pragma solidity 0.4.4;
     

    contract A { string private a = "test"; }

  2. Configured with double quotes

    pragma solidity 0.4.4;
     

    contract A { string private a = 'test'; }

Recommended

  1. Configured with double quotes

    pragma solidity 0.4.4;
     

    contract A { string private a = "test"; }

  2. Configured with single quotes

    pragma solidity 0.4.4;
     

    contract A { string private a = 'test'; }

  3. Configured with double quotes

string private constant STR = "You shall 'pass' !";
  1. Configured with single quotes
string private constant STR = 'You shall "pass" !';

Learn more

quotes on Solhint's documentation.