CORE-POS/IS4C

View on GitHub
pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs

Summary

Maintainability
B
4 hrs
Test Coverage

Method GetUSBHandle has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public override Stream GetUSBHandle(string filename, int report_size){
        if (filename.IndexOf("&") > 0){
            String[] parts = filename.Split(new Char[]{'&'});
            if (parts.Length != 2){
                System.Console.WriteLine(filename);
Severity: Minor
Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs - About 1 hr to fix

    Method CreateFile has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        [DllImport("kernel32.dll", SetLastError = true)] protected static extern IntPtr CreateFile([MarshalAs(UnmanagedType.LPStr)] string strName, uint nAccess, uint nShareMode, IntPtr lpSecurity, uint nCreationFlags, uint nAttributes, IntPtr lpTemplate);
    Severity: Major
    Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs - About 50 mins to fix

      Method SetupDiGetDeviceInterfaceDetail has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          [DllImport("setupapi.dll", SetLastError = true)] protected static extern bool SetupDiGetDeviceInterfaceDetail(IntPtr lpDeviceInfoSet, ref DeviceInterfaceData oInterfaceData, ref DeviceInterfaceDetailData oDetailData, uint nDeviceInterfaceDetailDataSize, ref uint nRequiredSize, IntPtr lpDeviceInfoData);
      Severity: Minor
      Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs - About 45 mins to fix

        Method SetupDiGetDeviceInterfaceDetail has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            [DllImport("setupapi.dll", SetLastError = true)] protected static extern bool SetupDiGetDeviceInterfaceDetail(IntPtr lpDeviceInfoSet, ref DeviceInterfaceData oInterfaceData, IntPtr lpDeviceInterfaceDetailData, uint nDeviceInterfaceDetailDataSize, ref uint nRequiredSize, IntPtr lpDeviceInfoData);
        Severity: Minor
        Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs - About 45 mins to fix

          Method SetupDiEnumDeviceInterfaces has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              [DllImport("setupapi.dll", SetLastError = true)] protected static extern bool SetupDiEnumDeviceInterfaces(IntPtr lpDeviceInfoSet, uint nDeviceInfoData, ref Guid gClass, uint nIndex, ref DeviceInterfaceData oInterfaceData);
          Severity: Minor
          Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/USB-Win32.cs - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status