HAECHI-LABS/vvisp

Prettier Compiler Warning

Closed this issue · 0 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ v ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

current compiler warning looks like this

{ component: 'general',
  formattedMessage:
   './packages/vvisp-utils/contracts/SecondB.sol:5:25: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n    function initialize(address _token, address _owner, address _addressA) public {\n                        ^------------^\n',
  message:
   'Unused function parameter. Remove or comment out the variable name to silence this warning.',
  severity: 'warning',
  sourceLocation:
   { end: 84,
     file: './packages/vvisp-utils/contracts/SecondB.sol',
     start: 70 },
  type: 'Warning' }
{ component: 'general',
  formattedMessage:
   './packages/vvisp-utils/contracts/SecondB.sol:5:41: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n    function initialize(address _token, address _owner, address _addressA) public {\n                                        ^------------^\n',
  message:
   'Unused function parameter. Remove or comment out the variable name to silence this warning.',
  severity: 'warning',
  sourceLocation:
   { end: 100,
     file: './packages/vvisp-utils/contracts/SecondB.sol',
     start: 86 },
  type: 'Warning' }
{ component: 'general',
  formattedMessage:
   './packages/vvisp-utils/contracts/SecondB.sol:5:57: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n    function initialize(address _token, address _owner, address _addressA) public {\n                                                        ^---------------^\n',
  message:
   'Unused function parameter. Remove or comment out the variable name to silence this warning.',
  severity: 'warning',
  sourceLocation:
   { end: 119,
     file: './packages/vvisp-utils/contracts/SecondB.sol',
     start: 102 },
  type: 'Warning' }
{ component: 'general',
  formattedMessage:
   './packages/vvisp-utils/contracts/SecondB.sol:5:5: Warning: Function state mutability can be restricted to pure\n    function initialize(address _token, address _owner, address _addressA) public {\n    ^ (Relevant source part starts here and spans across multiple lines).\n',
  message: 'Function state mutability can be restricted to pure',
  severity: 'warning',
  sourceLocation:
   { end: 156,
     file: './packages/vvisp-utils/contracts/SecondB.sol',
     start: 50 },
  type: 'Warning' }

Expected behavior

non JSON like warning.
I expect chalk-enabled beautiful log.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


vvisp version: X.Y.Z


Environment:
- Node version:
- Operating system:

Others: