def main():
    """Start here"""

    parser = make_parser()
    args = parser.parse_args()

    if args.version:
        from lintswitch import __version__
        print(__version__)
        return 0

    log_params = {'level': args.loglevel}
    if args.logfile:
        log_params['filename'] = args.logfile
    logging.basicConfig(**log_params)                   # pylint: disable=W0142

    LOG.debug('lintswitch start')

    work_queue = Queue()

    check_proc = Thread(target=worker,
                        args=(work_queue, args))
    check_proc.daemon = True
    check_proc.start()

    server = Thread(target=http_server.http_server,
                    args=(args.httpport,))
    server.daemon = True
    server.start()

    # Listen for connections from vim (or other) plugin
    listener = socket.socket()
    listener.bind(('127.0.0.1', args.lintport))
    listener.listen(10)

    try:
        main_loop(listener, work_queue)
    except KeyboardInterrupt:
        listener.close()
        print('Bye')

    return 0