Unused declarations

Another nifty feature of code inspection is spotting any unused function parameters or variables. In the foo() function of our example, a parameter named bar is passed in but never actually used inside the function. By hovering over this parameter, you can see the message Parameter 'bar' value is not used. This warning will also be displayed for any unused function, variable, or imported API.

As we are not using this parameter in the function, simply remove it from the function signature. You can also utilize intention actions, which we will consider in more detail after this section.