blob: 5239d37d23860bc8f2489ad00e6b51e9260b99d2 [file] [log] [blame]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.lint.detector.api
interface FileScanner {
/**
* Analysis is about to be performed on a specific file, perform any setup
* steps.
*
*
* Note: When this method is called at the beginning of checking an XML
* file, the context is guaranteed to be an instance of [XmlContext],
* and similarly for a Java source file, the context will be a
* [JavaContext] and so on.
*
* @param context the context for the check referencing the file to be
* checked, the project, etc.
*/
fun beforeCheckFile(context: Context)
/**
* Analysis has just been finished for a specific file, perform any cleanup
* or report issues found
*
*
* Note: When this method is called at the end of checking an XML
* file, the context is guaranteed to be an instance of [XmlContext],
* and similarly for a Java source file, the context will be a
* [JavaContext] and so on.
*
* @param context the context for the check referencing the file to be
* checked, the project, etc.
*/
fun afterCheckFile(context: Context)
}