Legalism (Western philosophy)
Legalism, in the Western sense, is the ethical attitude that holds moral conduct as a matter of rule following. It is an approach to the analysis of legal questions characterized by abstract logical reasoning focusing on the applicable legal text, such as a constitution, legislation, or case law, rather than on the social, economic, or political context. Legalism has occurred both in civil and common law traditions. It underlines both natural law and legal positivism. In its narrower versions, legalism may endorse the notion that the pre-existing body of authoritative legal materials already contains a uniquely pre-determined right answer to any legal problem that may arise. Legalism typically also claims that the task of the judge is to ascertain the answer to a legal question by an essentially mechanical process. See also 

 Interpretivism (legal)
 Legal positivism
 Natural law

References 

Legal reasoning
Theories of law